Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot import name 'relation' from 'sqlalchemy.orm #166

Open
anonpython1 opened this issue Aug 13, 2024 · 3 comments
Open

Cannot import name 'relation' from 'sqlalchemy.orm #166

anonpython1 opened this issue Aug 13, 2024 · 3 comments
Assignees

Comments

@anonpython1
Copy link

ckan-dev_1    | Traceback (most recent call last):
ckan-dev_1    |   File "/usr/bin/ckan", line 5, in <module>
ckan-dev_1    |     from ckan.cli.cli import ckan
ckan-dev_1    |   File "/srv/app/src/ckan/ckan/cli/cli.py", line 12, in <module>
ckan-dev_1    |     import ckan.plugins as p
ckan-dev_1    |   File "/srv/app/src/ckan/ckan/plugins/__init__.py", line 3, in <module>
ckan-dev_1    |     from ckan.plugins.core import *  # noqa: re-export
ckan-dev_1    |   File "/srv/app/src/ckan/ckan/plugins/core.py", line 21, in <module>
ckan-dev_1    |     import ckan.plugins.interfaces as interfaces
ckan-dev_1    |   File "/srv/app/src/ckan/ckan/plugins/interfaces.py", line 17, in <module>
ckan-dev_1    |     from ckan.model.user import User
ckan-dev_1    |   File "/srv/app/src/ckan/ckan/model/__init__.py", line 31, in <module>
ckan-dev_1    |     from ckan.model.package import (
ckan-dev_1    |   File "/srv/app/src/ckan/ckan/model/package.py", line 492, in <module>
ckan-dev_1    |     from ckan.model import tag
ckan-dev_1    |   File "/srv/app/src/ckan/ckan/model/tag.py", line 6, in <module>
ckan-dev_1    |     from sqlalchemy.orm import relation
ckan-dev_1    | ImportError: cannot import name 'relation' from 'sqlalchemy.orm' (/usr/lib/python3.10/site-packages/sqlalchemy/orm/__init__.py)
ckan-dev_1    | Exit with status 1. Restarting.

Getting this error. on running docker-compose -f docker-compose.dev.yml up. Any solution?

@kowh-ai
Copy link
Contributor

kowh-ai commented Aug 15, 2024

@anonpython1 - have you changed the FROM ckan/ckan-dev:2.10.4 line in Dockerfile.dev. I just need to know what to test this issue with

@kowh-ai kowh-ai self-assigned this Aug 15, 2024
@anonpython1
Copy link
Author

@kowh-ai Nope, i didn't change anything in Dockerfile.dev file.

@kowh-ai
Copy link
Contributor

kowh-ai commented Aug 21, 2024

For me it works....This is odd as relation changed to relationship from sqlalchemy v0.6

I'd clean your whole docker environment and start again, please see: https://github.com/ckan/ckan-docker/wiki/Docker-cleanup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants