Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

problem with PyInstaller, SQLAlchemy, and asyncio

I wrote a code with pyqt5 pandas sqlalchemy pyodbc libraries but when I want to make an exe from my py file with pyinstaller I get this error:

in _load_hook_module
    self._hook_module = importlib_load_source(
  File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\site-packages\PyInstaller\compat.py", line 632, in importlib_load_source
    return mod_loader.load_module()
  File "<frozen importlib._bootstrap_external>", line 529, in _check_name_wrapper
  File "<frozen importlib._bootstrap_external>", line 1029, in load_module
  File "<frozen importlib._bootstrap_external>", line 854, in load_module
  File "<frozen importlib._bootstrap>", line 274, in _load_module_shim
  File "<frozen importlib._bootstrap>", line 711, in _load
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\site-packages\PyInstaller\hooks\hook-sqlalchemy.py", line 32, in <module>
    dialects = eval(dialects.strip())
  File "<string>", line 0

SyntaxError: unexpected EOF while parsing

I searched for about 2 hours bet I couldn't find any solution

if you need to see my code comment on it and I will update the question with my code that I want to make exe of

like image 427
Alii Avatar asked Oct 14 '25 05:10

Alii


1 Answers

I finally get it to work

I was exploring about my error till I found this: this

and there was a guy that said: if you install asyncio externally and you use above 3.3 python version then uninstall asyncio using pip uninstall asyncio it's works for me because 3.4 and above version added this in python-core so no need to add externally asyncio

and what I have done actually: pip uninstall asyncio and it works like a charm!!!!

Thank you all

like image 100
Alii Avatar answered Oct 16 '25 18:10

Alii