You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running docker-compose build & docker-compose up from the zipfile on a mac, I run into the following issue:
app | Traceback (most recent call last):
app | File "manage.py", line 3, in <module>
app | from api import create_app
app | File "/app/api/__init__.py", line 7, in <module>
app | from sqlalchemy_utils import create_database, database_exists
app | File "/usr/local/lib/python3.7/site-packages/sqlalchemy_utils/__init__.py", line 1, in <module>
app | from .aggregates import aggregated # noqa
app | File "/usr/local/lib/python3.7/site-packages/sqlalchemy_utils/aggregates.py", line 372, in <module>
app | from .functions.orm import get_column_key
app | File "/usr/local/lib/python3.7/site-packages/sqlalchemy_utils/functions/__init__.py", line 1, in <module>
app | from .database import ( # noqa
app | File "/usr/local/lib/python3.7/site-packages/sqlalchemy_utils/functions/database.py", line 10, in <module>
app | from ..expressions import explain_analyze
app | File "/usr/local/lib/python3.7/site-packages/sqlalchemy_utils/expressions.py", line 4, in <module>
app | from sqlalchemy.sql.expression import (
app | ImportError: cannot import name '_literal_as_text' from 'sqlalchemy.sql.expression' (/usr/local/lib/python3.7/site-packages/sqlalchemy/sql/expression.py)
app | Traceback (most recent call last):
app | File "manage.py", line 3, in <module>
app | from api import create_app
app | File "/app/api/__init__.py", line 7, in <module>
app | from sqlalchemy_utils import create_database, database_exists
app | File "/usr/local/lib/python3.7/site-packages/sqlalchemy_utils/__init__.py", line 1, in <module>
app | from .aggregates import aggregated # noqa
app | File "/usr/local/lib/python3.7/site-packages/sqlalchemy_utils/aggregates.py", line 372, in <module>
app | from .functions.orm import get_column_key
app | File "/usr/local/lib/python3.7/site-packages/sqlalchemy_utils/functions/__init__.py", line 1, in <module>
app | from .database import ( # noqa
app | File "/usr/local/lib/python3.7/site-packages/sqlalchemy_utils/functions/database.py", line 10, in <module>
app | from ..expressions import explain_analyze
app | File "/usr/local/lib/python3.7/site-packages/sqlalchemy_utils/expressions.py", line 4, in <module>
app | from sqlalchemy.sql.expression import (
app | ImportError: cannot import name '_literal_as_text' from 'sqlalchemy.sql.expression' (/usr/local/lib/python3.7/site-packages/sqlalchemy/sql/expression.py)
Looks like this happens on the line:
from sqlalchemy_utils import create_database, database_exists
In api/__init__.py. The solution appears to be to update requirements.txt with the following change:
When running
docker-compose build
&docker-compose up
from the zipfile on a mac, I run into the following issue:Looks like this happens on the line:
In
api/__init__.py
. The solution appears to be to updaterequirements.txt
with the following change:According to this StackOverflow discussion: https://stackoverflow.com/questions/66644975/importerror-cannot-import-name-columnentity-from-sqlalchemy-orm-query
The text was updated successfully, but these errors were encountered: