jo1gi / audiobook-dl

Audiobook CLI downloader
GNU General Public License v3.0
248 stars 43 forks source link

AttributeError: module 'functools' has no attribute 'cache' #33

Open TheSupraLife opened 1 year ago

TheSupraLife commented 1 year ago

When I run: audiobook-dl --username <username> --password <password> <url of storytel audiobook>

I get:

Traceback (most recent call last):
  File "/usr/local/bin/audiobook-dl", line 5, in <module>
    from audiobookdl.__main__ import run
  File "/usr/local/lib/python3.8/dist-packages/audiobookdl/__init__.py", line 1, in <module>
    from .utils.audiobook import AudiobookFile, Chapter
  File "/usr/local/lib/python3.8/dist-packages/audiobookdl/utils/__init__.py", line 4, in <module>
    @functools.cache
AttributeError: module 'functools' has no attribute 'cache'

What am I doing wrong?

jo1gi commented 1 year ago

Nothing. I was using a function that was first introduced in python 3.9. I have removed it now on the Github version.

jo1gi commented 1 year ago

@TheSupraLife Did it work?

TheSupraLife commented 1 year ago

@jo1gi Can you provide me a example of a query to get it to work with storytel?

My input: audiobook-dl --username <username> --password <password> <url of storytel audiobook>

Thanks in advance!

jo1gi commented 1 year ago

That should work if the url looks like https://www.storytel.com/<lang>/books/<book-id> and the book is in your bookshelf. If it doesn't please send me the command output with the --debug argument.