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 error #29

Closed
ehsanonline opened this issue Nov 13, 2021 · 2 comments
Closed

cannot import error #29

ehsanonline opened this issue Nov 13, 2021 · 2 comments

Comments

@ehsanonline
Copy link

Hello. I installed this using pip on python 3.8.10 and virtualenv, ubuntu 20.04, and it was installed successfully. But when I ran the first example code from the readme, I got this error from the line from asyncmy import connect:
ImportError: cannot import name 'connect' from partially initialized module 'asyncmy' (most likely due to a circular import)
There is no circular import, It's just a single file with the first example code copied. I commented that import line, then it shows this error for the next line from asyncmy.cursors import DictCursor:
ModuleNotFoundError: No module named 'asyncmy.cursors'; 'asyncmy' is not a package.

@long2ice
Copy link
Owner

What's you file name?

@ehsanonline
Copy link
Author

Oh! Silly me! I named the file asyncmy.py, which was the problem. Thank you.

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