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

Better ImportError message in case a DLL was not added into the package #3017

Merged
merged 2 commits into from Feb 25, 2018

Conversation

Projects
None yet
2 participants
@satarsa
Contributor

satarsa commented Nov 20, 2017

If PyInstaller fails to add a DLL into the package, then the error message looks like:

...
line 631, in exec_module
    exec(bytecode, module.__dict__)
  File "site-packages\scipy\fftpack\basic.py", line 12, in <module>
  File "c:\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 714, in load_module                                                                
ImportError: DLL load failed: The specified module could not be found.

This pull request improves the error message. In my case it becomes:

...
line 631, in exec_module
    exec(bytecode, module.__dict__)
  File "site-packages\scipy\fftpack\basic.py", line 12, in <module>
  File "c:\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 717, in load_module
    raise ImportError(f'{err}: {fullname}')
ImportError: DLL load failed: The specified module could not be found.: scipy.fftpack._fftpack
@htgoebel

This comment has been minimized.

Member

htgoebel commented Nov 21, 2017

Thanks for this enhancement. Please fix the remaining code styling errors and prefix the commit message with "Loader: ".

BTW: raise ImportError('%s: %s' % err, fullname)) would be shorter :-)

@htgoebel htgoebel added this to the PyInstaller 3.4 milestone Nov 21, 2017

@satarsa

This comment has been minimized.

Contributor

satarsa commented Nov 21, 2017

OK, fixed, I guess. Thanks.

@htgoebel htgoebel merged commit 4ed4e23 into pyinstaller:develop Feb 25, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@htgoebel

This comment has been minimized.

Member

htgoebel commented Feb 25, 2018

Thanks for this pull-request. I finally found time merging it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment