bmorcos/discord-downloader

DeprecationWarning: logout is deprecated, use Client.close instead

Closed this issue · 1 comments

Hi

trying to run your code
got error :

Connected to Serveur de ***** as ddddd#2749, emissary of ddddddd

**** Saved 0 files to ./discord_downloads_20220123
/home/ddd/.local/lib/python3.8/site-packages/discord/client.py:343: DeprecationWarning: logout is deprecated, use Client.close instead.
await coro(*args, **kwargs)

Goodbye world, be excellent to eachother!
/home/dddd/.local/lib/python3.8/site-packages/discord/client.py:66: DeprecationWarning: Task.all_tasks() is deprecated, use asyncio.all_tasks() instead
tasks = {t for t in task_retriever(loop=loop) if not t.done()}

with command : "python3 discord_downloader/downloader.py .YZgv4w.-Q_gCkrMdQeB8A -c "--*" -a "2022-01-20""

Tried on Ubuntu 20.04 WSL Python 3.7 & Windows 10 with Python3.6 gave me this err:
AttributeError: 'NoneType' object has no attribute 'split'

I can't seem to reproduce this. I've tried a couple different versions of Python 3.7 and a couple version of discord.py on Ubuntu 20.04. I've never tried on Windows and am not sure if it works 🤷.

I see the first deprecation warning:

DeprecationWarning: logout is deprecated, use Client.close instead.
  await coro(*args, **kwargs)

I do not see the second deprecation warning after the "Goodbye" line nor do I get an attribute error.

Also note that I am not supporting regex for the channel name (this shouldn't give an error but may not do what you expect). Similarly, you may need to escape some characters (e.g. \- for -) depending on the terminal/environment.

--

I will leave this open for a bit, if you can get some more details about reproducing the problem I will take a look, or feel free to try and fix the issue yourself and submit a PR or post the solution.