glomatico / gamdl

A Python CLI app for downloading Apple Music songs/music videos/posts.
MIT License
755 stars 85 forks source link

Not running because of pywidevine error #61

Closed ValentinVV1 closed 10 months ago

ValentinVV1 commented 10 months ago

Hi! I have moved to a new PC and had to reinstall everything including gamdl (which I used without problems in the past).

I did everything as required but when I try to launch gamdl, I receive the following errors:

C:\Users\Valentin>gamdl
Traceback (most recent call last):
  File "c:\users\valentin\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\valentin\appdata\local\programs\python\python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Valentin\AppData\Local\Programs\Python\Python37\Scripts\gamdl.exe\__main__.py", line 4, in <module>
  File "c:\users\valentin\appdata\local\programs\python\python37\lib\site-packages\gamdl\cli.py", line 11, in <module>
    from .downloader import Downloader
  File "c:\users\valentin\appdata\local\programs\python\python37\lib\site-packages\gamdl\downloader.py", line 17, in <module>
    from pywidevine import PSSH, Cdm, Device, WidevinePsshData
ImportError: cannot import name 'WidevinePsshData' from 'pywidevine' (c:\users\valentin\appdata\local\programs\python\python37\lib\site-packages\pywidevine\__init__.py)

Thank you!

glomatico commented 10 months ago

Fixed on the new release.

ValentinVV1 commented 10 months ago

@glomatico Hi, thank you for the fast update! Unfortunately I got another error that I have never seen.

Traceback (most recent call last):
  File "c:\users\valentin\appdata\local\programs\python\python37\lib\http\cookiejar.py", line 1782, in __init__
    filename+""
TypeError: unsupported operand type(s) for +: 'WindowsPath' and 'str'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\valentin\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\valentin\appdata\local\programs\python\python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Valentin\AppData\Local\Programs\Python\Python37\Scripts\gamdl.exe\__main__.py", line 7, in <module>
  File "c:\users\valentin\appdata\local\programs\python\python37\lib\site-packages\click\core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "c:\users\valentin\appdata\local\programs\python\python37\lib\site-packages\click\core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "c:\users\valentin\appdata\local\programs\python\python37\lib\site-packages\click\core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\users\valentin\appdata\local\programs\python\python37\lib\site-packages\click\core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "c:\users\valentin\appdata\local\programs\python\python37\lib\site-packages\gamdl\cli.py", line 341, in main
    downloader.setup_session()
  File "c:\users\valentin\appdata\local\programs\python\python37\lib\site-packages\gamdl\downloader.py", line 89, in setup_session
    cookies = MozillaCookieJar(self.cookies_location)
  File "c:\users\valentin\appdata\local\programs\python\python37\lib\http\cookiejar.py", line 1784, in __init__
    raise ValueError("filename must be string-like")
ValueError: filename must be string-like

I tried to give the exact path of the cookies.txt file with -c but it doesn't make a difference. Maybe I've done something wrong...

Thank you!