mirror of
https://github.com/brentvollebregt/auto-py-to-exe.git
synced 2026-04-25 19:55:49 +03:00
[GH-ISSUE #209] ModuleNotFoundError on existing module and fine working script #191
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @PierreBarreau on GitHub (Nov 2, 2021).
Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/209
Hi (first question on GitHub, hope I'm doing it good)
I'm facing an issue on the import of the Cisco Meraki SDK (an SDK to manage network devices), it's the first time where hidden-imports or paths can't solve my issue. I'm using:
The command I use to compile on auto_py_to_exe :
pyinstaller --noconfirm --onefile --console --no-embed-manifest "path/to/file/list_all_clients.py".The error appear when launching the exe compiled as shown bellow (code working perferctly in .py):
I think the issue comes from the format of the import in the __init__py of meraki. But I'm not good enough understand and solve this. In the code of init.py, the line is written like this
If changing the order of the imports, to be sure it's not related to one :
I get the same error :
I tried to modify the line to be "import rest_session" but unsuccessfully (doing it like this make the .py fail too). I think it comes from the . which for me means it's in current repository.
I also tried to add a path to the lib repository :
pyinstaller --noconfirm --onefile --console --no-embed-manifest --paths "path/to/lib/meraki" "path/to/file/list_all_clients.py"without success. Same for the hidden imports.I don't know if I gave enough information to try to debug.
Thanks in advance,
@brentvollebregt commented on GitHub (Nov 3, 2021):
By any chance have you named one of your files
meraki.py? Second question would be just to check if you have run your script by itself (without turning it into an exe).@PierreBarreau commented on GitHub (Nov 3, 2021):
I don't have any file named
meraki.pyand yes I already ran the script as.pywithout any failure.I also tried to move my lib repository from it's original position in the Python3-6 repository (where pip putted it) into the repository of my script (still working in
.pybut still not working as.exe(even with the hidden-imports and paths)@brentvollebregt commented on GitHub (Nov 4, 2021):
@PierreBarreau could you please provide a minimal reproducible example?
@github-actions[bot] commented on GitHub (Jan 4, 2022):
This issue is stale because it has been open for 60 days with no activity. Remove stale label or comment on this issue or it will be closed in 5 days.
@github-actions[bot] commented on GitHub (Jan 9, 2022):
Closing issue due to no activity in more than 60 days.