This is very similar to issues #5109 and #5142 , however, upon running pip install discord --upgrade, the requirements were already satisfied. Looking at version info, I get that discord == 1.0.1, and discord.py == 1.3.4, which are the recommended versions to fix this issue. I still receive the same error, however:
Traceback (most recent call last):
File "main.py", line 56, in <module>
client.run(TOKEN)
File "C:\Users\Oaken_u0sat6a\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\client.py", line 640, in run
return future.result()
File "C:\Users\Oaken_u0sat6a\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\client.py", line 621, in runner
await self.start(*args, **kwargs)
File "C:\Users\Oaken_u0sat6a\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\client.py", line 585, in start
await self.connect(reconnect=reconnect)
File "C:\Users\Oaken_u0sat6a\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\client.py", line 499, in connect
await self._connect()
File "C:\Users\Oaken_u0sat6a\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\client.py", line 463, in _connect
await self.ws.poll_event()
File "C:\Users\Oaken_u0sat6a\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\gateway.py", line 471, in poll_event
await self.received_message(msg)
File "C:\Users\Oaken_u0sat6a\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\gateway.py", line 425, in received_message
func(data)
File "C:\Users\Oaken_u0sat6a\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\state.py", line 750, in parse_guild_create
guild = self._get_create_guild(data)
File "C:\Users\Oaken_u0sat6a\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\state.py", line 725, in _get_create_guild
guild._from_data(data)
File "C:\Users\Oaken_u0sat6a\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\guild.py", line 297, in _from_data
self._sync(guild)
File "C:\Users\Oaken_u0sat6a\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\guild.py", line 324, in _sync
self._add_channel(TextChannel(guild=self, data=c, state=self._state))
File "C:\Users\Oaken_u0sat6a\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\channel.py", line 107, in __init__
self._update(guild, data)
File "C:\Users\Oaken_u0sat6a\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\channel.py", line 131, in _update
self._fill_overwrites(data)
File "C:\Users\Oaken_u0sat6a\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\abc.py", line 294, in _fill_overwrites
self._overwrites.append(_Overwrites(id=overridden_id, **overridden))
TypeError: __new__() got an unexpected keyword argument 'deny_new'
I am running a virtual environment, as without it, no matter if I've pip installed discord, it still raises a modulenotfound error, for all my projects utilizing the library. Nothing has changed in my code, other than importing bs4 for some scraping. What's the difference here?
Python version: 3.8.1
Discord: 1.0.1
Discord.py : 1.3.4
Windows home edition, version 1909, build 18363.959
Please uninstall discord.
discord is the wrong package to be installing, and you should be installing discord.py.
As mentioned in other issues, you need to install it to the correct environment. You haven't and this can be proven by checking the line numbers compared to the repository.
@XuaTheGrate I've uninstalled discord, and still made sure that it was updated within the virtual environment local to the project, and run it with the venv activated, as I had done previously. What environment must I install it to?
Edit: yes, it was simply another issue with my virtual environment acting up, due to an external factor that has now been taken care of. All's fine now.
same error, updated to latest and recreated new key on discord site, solved problems.
Most helpful comment
Please uninstall
discord.