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

pyinstaller package error #93

Open
Chise1 opened this issue Apr 29, 2024 · 1 comment
Open

pyinstaller package error #93

Chise1 opened this issue Apr 29, 2024 · 1 comment

Comments

@Chise1
Copy link

Chise1 commented Apr 29, 2024

When use pyinstaller package asyncmy, will get like this:

Traceback (most recent call last):
  File "main.py", line 11, in <module>
    from asyncmy import connect
  File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
  File "asyncmy\__init__.py", line 1, in <module>
  File "asyncmy\\connection.pyx", line 14, in init asyncmy.connection
ImportError: cannot import name auth
[432] Failed to execute script 'main' due to unhandled exception!

use pyinstaller's hiddenimports can fix this problem.

Maybe you can add import in init.py,like this:

from asyncmy.connection import Connection, connect  # noqa:F401
from asyncmy.pool import Pool, create_pool  # noqa:F401
from asyncmy import auth
from asyncmy import constants
from asyncmy import structs,converters,charset,optionfile,protocol
from asyncmy import contexts
from asyncmy import version
@Mini-Right
Copy link

7684e16db83efc340074f6b40f0d571

I encountered the same issue while using PyInstaller for packaging. After resolving it with your code and repackaging, the following error occurred. Now I’m unsure how to proceed with the solution.

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