0

I have a problem when I create a build with PyInstaller.

This is the stacktrace of error:

File "asyncpg/protocol/__init__.py", line 8, in <module>
File "asyncpg/protocol/protocol.pyx", line 1, in init asyncpg.protocol.protocol
File "asyncpg/pgproto/./buffer.pyx", line 12, in init asyncpg.pgproto.pgproto
ImportError: cannot import name exceptions

I added the asyncpg.pgproto.pgproto when I compiled my application but the error persists. This is an example of pyinstaller command:

pyinstaller --hidden-import=asyncpg.pgproto.pgproto --onefile --distpath  folter/example_service example/__main__.py --name example-app

Thanks!

Flavio Milan
  • 467
  • 3
  • 16

1 Answers1

0

I had this problem too, and I found this solution:

just add more --hidden-import

Python 3.9.4 Pyinstaller 4.2 It helps!