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

ImportError when pypika is also installed #6

Open
jorenham opened this issue Sep 29, 2022 · 0 comments
Open

ImportError when pypika is also installed #6

jorenham opened this issue Sep 29, 2022 · 0 comments

Comments

@jorenham
Copy link

When pypika and pypika-tortoise are both installed, both are installed within the same site-packages directory (see #5). This causes an ImportError, because dialects/__init__.py is imported by upstream pypika's __init__.py, instead of its own dialects.py:

File "/myproject/.venv/lib/python3.10/site-packages/tortoise/__init__.py", line 11, <module>
from pypika import Table
File "/myproject/.venv/lib/python3.10/site-packages/pypika/__init__.py", line 34, <module>
from pypika.dialects import (

dialects: <module 'pypika.dialects' from '/myproject/.venv/lib/python3.10/site-packages/pypika/dialects/__init__.py'>

ImportError:
cannot import name 'ClickHouseQuery' from 'pypika.dialects' (/myproject/.venv/lib/python3.10/site-packages/pypika/dialects/__init__.py)

Please rename this package.

And if you've watched "the Fly", you'll know the disastrous consequences of merging two species 😉 .

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

1 participant