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

Windows: Could not find module 'discid.dll' #143

Open
jesus2099 opened this issue Mar 26, 2023 · 1 comment · May be fixed by #144
Open

Windows: Could not find module 'discid.dll' #143

jesus2099 opened this issue Mar 26, 2023 · 1 comment · May be fixed by #144

Comments

@jesus2099
Copy link
Contributor

jesus2099 commented Mar 26, 2023

Now that my laptop has been completely reset, it does not work.
Maybe last time, it worked thanks to pre-existing stuff.

Now I get this error:

C:\Users\bob\Documents\PRG\DOS\isrcsubmit-2.1.1-beta-win64>isrcsubmit.bat
Traceback (most recent call last):
  File "C:\Users\bob\Documents\PRG\DOS\isrcsubmit-2.1.1-beta-win64\isrcsubmit.py", line 47, in <module>
    import discid
  File "C:\Users\bob\Documents\PRG\DOS\isrcsubmit-2.1.1-beta-win64\discid\__init__.py", line 30, in <module>
    from discid.disc import read, put, Disc, DiscError, TOCError
  File "C:\Users\bob\Documents\PRG\DOS\isrcsubmit-2.1.1-beta-win64\discid\disc.py", line 24, in <module>
    from discid.libdiscid import _LIB, FEATURES
  File "C:\Users\bob\Documents\PRG\DOS\isrcsubmit-2.1.1-beta-win64\discid\libdiscid.py", line 108, in <module>
    _LIB = _open_library(_LIB_NAME)
  File "C:\Users\bob\Documents\PRG\DOS\isrcsubmit-2.1.1-beta-win64\discid\libdiscid.py", line 99, in _open_library
    return ctypes.cdll.LoadLibrary(lib_name)
  File "C:\Users\bob\AppData\Local\Programs\Python\Python310\lib\ctypes\__init__.py", line 452, in LoadLibrary
    return self._dlltype(name)
  File "C:\Users\bob\AppData\Local\Programs\Python\Python310\lib\ctypes\__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'discid.dll' (or one of its dependencies). Try using the full path with constructor syntax.

Although there is a discid.dll file in the isrcsubmit-2.1.1-beta-win64 folder.

My new PR #144, based on @omgitsraven, would fix this ticket without breaking other OS and older Python.

@jesus2099
Copy link
Contributor Author

jesus2099 commented Mar 26, 2023

Oh this patch from @omgitsraven does work:

os.add_dll_directory(os.getcwd())

Same issue #124 with PR #125.
Indeed I am now in Python 3.10.7 and this PR was supposed to work for Python 3.8+!

This PR was problematic for Pyhton 3.7-.

jesus2099 added a commit to jesus2099/JonnyJD_musicbrainz-isrcsubmit that referenced this issue Mar 26, 2023
I will also test on Linux to see if it hinders non-Windows
Fixes JonnyJD#143
jesus2099 added a commit to jesus2099/JonnyJD_musicbrainz-isrcsubmit that referenced this issue Mar 26, 2023
jesus2099 added a commit to jesus2099/JonnyJD_musicbrainz-isrcsubmit that referenced this issue Mar 28, 2023
Fixes JonnyJD#124 and JonnyJD#143 without breaking other OS nor older Python
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

Successfully merging a pull request may close this issue.

1 participant