@Prasad, Rakesh Based on the error, you are likely not running your function without async
, causing a thread creation instead of an event loop as mentioned in the official docs.
gremlin-python not working with azure function.
hi,
I am trying to use gremlin python in azure function.
technically it should be possible, but i ran into multiple issues.
1) tornedo used in gremlin python has compatibility issue with python 3.8+, it impacts windows machine, so running on local was nightmare, but it worked fine in axure(where machine is linux)
for local fix was
if sys.platform == 'win32':
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) # python-3.8.0a4
2) i had to write following line in my init function, without it, i was not able to run my function multiple times
import nest_asyncio
nest_asyncio.apply()
3) now when i am able to run the function, issue is. I am not able to close client.close() function without getting error. "client" is for cosmosDB(gremlin). error is mentioned in the link below.
-
Pramod Valavala 20,611 Reputation points Microsoft Employee
2021-02-24T04:57:56.04+00:00