Closed isabelcosta closed 3 years ago
@anitab-org/mentorship-maintainers Not sure, if I should revert the latest commit 🤔 if this is even a problem with the app
I ran the app locally with the latest commit and this did not happen 🤔
lol I really like stack overflow sometimes https://stackoverflow.com/a/64698899
I just googled the main error sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:postgres
and found the error.
I changed the environment variable from:
DB_TYPE='postgres'
to:
DB_TYPE='postgresql'
Nailed it ✅
@isabelcosta probably the same happens here https://github.com/anitab-org/mentorship-backend/pull/1005#issuecomment-812510786
Describe the bug
The main development server is erroring w/ 500
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Screenshots
Additional context
I recently merged this PR, I did not test and assumed it would be fine, because it was
coverage
dependency. I thought this was only used in tests. Check latest commits here https://github.com/anitab-org/mentorship-backend/commits/developShould I revert them 🤔 not sure how the latest could have done that. I suspect it is an heroku thing 🤔
Logs on Heroku
``` 2021-05-16T00:12:50.790306+00:00 heroku[router]: at=info method=GET path="/" host=mentorship-backend-temp.herokuapp.com request_id=c5125532-5c3b-4d5c-a84d-eee38c33065c fwd="86.159.96.187" dyno=web.1 connect=0ms service=21ms status=500 bytes=244 protocol=https 2021-05-16T00:12:50.788806+00:00 app[web.1]: [2021-05-16 00:12:50 +0000] [11] [ERROR] Error handling request / 2021-05-16T00:12:50.788817+00:00 app[web.1]: Traceback (most recent call last): 2021-05-16T00:12:50.788817+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/sync.py", line 134, in handle 2021-05-16T00:12:50.788818+00:00 app[web.1]: self.handle_request(listener, req, client, addr) 2021-05-16T00:12:50.788818+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/sync.py", line 175, in handle_request 2021-05-16T00:12:50.788819+00:00 app[web.1]: respiter = self.wsgi(environ, resp.start_response) 2021-05-16T00:12:50.788826+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 2309, in __call__ 2021-05-16T00:12:50.788826+00:00 app[web.1]: return self.wsgi_app(environ, start_response) 2021-05-16T00:12:50.788826+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 2295, in wsgi_app 2021-05-16T00:12:50.788826+00:00 app[web.1]: response = self.handle_exception(e) 2021-05-16T00:12:50.788827+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask_restx/api.py", line 639, in error_router 2021-05-16T00:12:50.788827+00:00 app[web.1]: return original_handler(e) 2021-05-16T00:12:50.788828+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 1741, in handle_exception 2021-05-16T00:12:50.788828+00:00 app[web.1]: reraise(exc_type, exc_value, tb) 2021-05-16T00:12:50.788828+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise 2021-05-16T00:12:50.788829+00:00 app[web.1]: raise value 2021-05-16T00:12:50.788829+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app 2021-05-16T00:12:50.788830+00:00 app[web.1]: response = self.full_dispatch_request() 2021-05-16T00:12:50.788830+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 1808, in full_dispatch_request 2021-05-16T00:12:50.788830+00:00 app[web.1]: self.try_trigger_before_first_request_functions() 2021-05-16T00:12:50.788831+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 1855, in try_trigger_before_first_request_functions 2021-05-16T00:12:50.788831+00:00 app[web.1]: func() 2021-05-16T00:12:50.788831+00:00 app[web.1]: File "/app/run.py", line 45, in create_tables 2021-05-16T00:12:50.788832+00:00 app[web.1]: db.create_all() 2021-05-16T00:12:50.788832+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py", line 1094, in create_all 2021-05-16T00:12:50.788832+00:00 app[web.1]: self._execute_for_all_tables(app, bind, 'create_all') 2021-05-16T00:12:50.788833+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py", line 1086, in _execute_for_all_tables 2021-05-16T00:12:50.788833+00:00 app[web.1]: op(bind=self.get_engine(app, bind), **extra) 2021-05-16T00:12:50.788833+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py", line 1017, in get_engine 2021-05-16T00:12:50.788834+00:00 app[web.1]: return connector.get_engine() 2021-05-16T00:12:50.788834+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py", line 594, in get_engine 2021-05-16T00:12:50.788834+00:00 app[web.1]: self._engine = rv = self._sa.create_engine(sa_url, options) 2021-05-16T00:12:50.788835+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py", line 1027, in create_engine 2021-05-16T00:12:50.788835+00:00 app[web.1]: return sqlalchemy.create_engine(sa_url, **engine_opts) 2021-05-16T00:12:50.788836+00:00 app[web.1]: File "