Hi,
Is there a bullet proof on this "import error" in the virtual environment? I don't get the same error on other platform. Please see attached proof that I have configured my virtual environment but the app doesn't recognize it.
Hi,
Is there a bullet proof on this "import error" in the virtual environment? I don't get the same error on other platform. Please see attached proof that I have configured my virtual environment but the app doesn't recognize it.
I can't see my attached image.
Just please see dropbox image link below: https://www.dropbox.com/scl/fi/rb6rngrks7gp0dejchiht/import_error.jpg?rlkey=wnaiqots7q6v01jaf9obcrd5u&dl=0
Yea something fishy with the web app.
I tried doing the python app.py
inside the virtual env and I don't get any errors. It's only the webapp
It looks like you're running your website from the editor -- because you might have multiple websites using multiple different virtualenvs, our "Run" button doesn't try to guess which one you mean, and will just run your code in the default system environment. You can tell it to use your virtualenv with a "hashbang" at the start.
However, you don't need to run your website from the editor at all in order to have your website working -- once you've set it up on the "Web" page, as you already have, it will be automatically run as necessary to handle incoming requests. Any errors will be written to the error log, which you can access from the "Web" page -- note that the most recent error will be at the bottom of the file.
ah thanks for the response. Seems like the it is indeed not using my virtualenvs when executing the "Run". Hasbang is the way to go.
Thanks for the tip!
Glad we could help!