mkb79 / audible-cli

A command line interface for audible package. With the cli you can download your Audible books, cover, chapter files.
GNU Affero General Public License v3.0
469 stars 47 forks source link

Uncaught Exception #180

Closed HardyElektronik closed 10 months ago

HardyElektronik commented 10 months ago

Any solution to this problem? Downloaded over github and installed it on this way:

git clone https://github.com/mkb79/audible-cli.git cd audible-cli pip install .

Everytime I try to download something, I get this error messages:

` No new files downloaded.

Uncaught Exception

Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/audible_cli/cli.py", line 61, in main sys.exit(cli(*args, **kwargs))

File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1157, in call return self.main(*args, **kwargs)

File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1078, in main rv = self.invoke(ctx)

File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1688, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx))

File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1434, in invoke return ctx.invoke(self.callback, **ctx.params)

File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 783, in invoke return __callback(*args, **kwargs)

File "/usr/local/lib/python3.9/dist-packages/click/decorators.py", line 92, in new_func return ctx.invoke(f, obj, *args, **kwargs)

File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 783, in invoke return __callback(*args, **kwargs)

File "/usr/local/lib/python3.9/dist-packages/click/decorators.py", line 92, in new_func return ctx.invoke(f, obj, *args, **kwargs)

File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 783, in invoke return __callback(*args, **kwargs)

File "/usr/local/lib/python3.9/dist-packages/audible_cli/decorators.py", line 25, in wrapper return asyncio.run(f(*args, ** kwargs))

File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run return loop.run_until_complete(main)

File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete return future.result()

File "/usr/local/lib/python3.9/dist-packages/audible_cli/decorators.py", line 63, in wrapper return await f(*args, client, **kwargs)

File "/usr/local/lib/python3.9/dist-packages/audible_cli/cmds/cmd_download.py", line 917, in cli await QUEUE.join()

File "/usr/lib/python3.9/asyncio/queues.py", line 223, in join await self._finished.wait()

File "/usr/lib/python3.9/asyncio/locks.py", line 226, in wait await fut

RuntimeError: Task <Task pending name='Task-1' coro=<pass_client..coro..wrapper() running at /usr/local/lib/python3.9/dist-packages/audible_cli/decorators.py:63> cb=[_run_until_complete_cb() at /usr/lib/python3.9/asyncio/base_events.py:184]> got Future attached to a different loop `

Any idea?

mkb79 commented 10 months ago

Yeah, I've an idea what the issue is. Can you try out the following:

# create and activate a virtual environment
python3 -m venv venv-audible
source venv-audible/bin/activate

# install audible-cli
git clone https://github.com/mkb79/audible-cli.git
cd audible-cli
pip install .

# run your command
audible download …

Solves this your issue?

Edit: This issue is Python < 3.10 related. I'll fix this now.

mkb79 commented 10 months ago

@HardyElektronik Fix is on the master branch now. You can pull the branch and reinstall audible-cli. This should solve your issue.

HardyElektronik commented 10 months ago

Very nice! Works like a charm. Thanks!