From @Tacomatte: I just tried making a couple functions using the default “Write Code” code for Python 3.9 and I get “500: Error during vm initialisation” when I try running the first one. Status on the Dashboard says “Running”. The other has been confirming for about a half hour.
From @Tacomatte: Running Function: ae5cbf1cebca2b7387cb0246da8577454d46955431a558224ceabd0b6761ea80
Confirming Function; 7e33dc7cb9d3022217980fdfd1d66d434953fb4f486eff05796cd73c5816f014
From @Tacomatte: Yes. I also tried making one through the account page, but the Deploy button was unresponsive.
This is the error I see in the logs of the lab CRN:
2023-11-20 18:03:41,605 | ERROR | Traceback (most recent call last):
File "/root/init1.py", line 428, in main
app: Union[ASGIApplication, subprocess.Popen] = setup_code(
File "/root/init1.py", line 225, in setup_code
return setup_code_asgi(code=code, encoding=encoding, entrypoint=entrypoint)
File "/root/init1.py", line 185, in setup_code_asgi
app: ASGIApplication = locals[entrypoint]
KeyError: 'main:app'
NoneType: None
Looks like an error in the message format.
Curently investigating the issue, here is my lead so far:
The issue comes from the definition of the entrypoint in ASGI:
In this case, “main:app” was used, where “main” is supposed to refer to the Python module, for example “main.py”, and “app” to the variable that defines the application inside the module.
When uploading a file in the “plain” format, only “app” should be provided as entrypoint since there is no file to open.