What I’m trying to do:
Start the app in the Development/build browser interface.
Basically start and run the server code
Using Python 3.10 (beta) with openai installed
What I’ve tried and what’s not working:
Switching back to Python 3 Full, but does not have the package version I want to use.
Switching back to Python 3.10 without any extra packages reproduces the error.
Putting on Python 3.10 with openai installed leads to the error:
Starting server runtime... Starting server runtime... anvil.server.RuntimeUnavailableError: Internal server error: Server runtime failed to start. at Main, line 111
previous posts suggested an outage, just wanted to see if that was the case today too.
Can’t share my code because I haven’t figured out how to hide my keys in env variables, sorry
Client code (add a button to a form, then set its on_click handler):
def button_1_click(self, **event_args):
"""This method is called when the button is clicked"""
anvil.server.call('do_server_print')
If this fails, then swap your python version to Full Python 3 instead of Python 3.10 and try again. I would do a full browser refresh (ctrl+F5) when changing this setting to ensure its a new browser session attempting a new server execution attempt. Adding a new package to your Python 3.10 install will force a rebuild of the image too
Thanks for your suggestion! Getting this error when running on Python 3.10 (no packages): anvil.server.RuntimeUnavailableError: Internal server error: Server runtime failed to start.
at Main, line 120
Same error when using Python 3.10 with openai and urllib3 2.2.2 built.
When trying Full Python 3: ImportError: cannot import name 'OpenAI' from 'openai' (/usr/local/lib/python3.7/site-packages/openai/__init__.py)
Try selecting a different Python version.
at ServerModule1, line 6
called from /downlink/anvil_downlink_worker/__init__.py:70
called from /downlink/anvil_downlink_worker/__init__.py:205
called from Main, line 120
but after commenting out offending imports:
server worked
Error seems specific to my use of Python 3.10 (Beta)…
Turns out this question was about an on-site Enterprise installation, and therefore does not affect the public anvil.works environment at all!
I’m closing this thread and moving things to our private email support channel, where we’re liasing with the team that manages their Enterprise deployment