Hey, folks
I’m building an app that collects data from a form and loads into a server DB.
When running in my localhost, everything works just fine, but when I try to deploy on streamlit, I keep on getting this error
2021-11-25 16:24:49.688 Uncaught app exception
Traceback (most recent call last):
File "/home/appuser/venv/lib/python3.7/site-packages/streamlit/script_runner.py", line 354, in _run_script
exec(code, module.__dict__)
File "/app/mdgeo_controle_horas/app.py", line 5, in <module>
import controllers.HoursController as HoursController
File "/app/mdgeo_controle_horas/controllers/HoursController.py", line 1, in <module>
import services.database as db
File "/app/mdgeo_controle_horas/services/database.py", line 1, in <module>
import psycopg2
ModuleNotFoundError: No module named 'psycopg2'
See, I uploaded the requeriments file with both psycopg2 and psycopg2-binary, but I keep on getting the error.
Controllers and Services import are .py files that I created and also uploaded with the code, you can see the repository here.
I set everything in my streamlit secrets and as I said above, in my localhost works just fine.
Does anyone know if these error are related to my scripts imports or the psycopg2 library? Is there any solution to this?
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.
Reject all
Accept all