0

Okay. This is complicated for me to explain, but I'll try my best: it starts when one day I decide to run and test my Discord bot (using discord.py) when I'm greeted with this error:

TypeError: __new__() got an unexpected keyword argument 'deny_new'

If needed, the full traceback:

  File "script.py", line 14, in <module>
    bot.run('token')
  File "C:\Users\44794\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\client.py", line 640, in run
    return future.result()
  File "C:\Users\44794\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\client.py", line 621, in runner
    await self.start(*args, **kwargs)
  File "C:\Users\44794\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\client.py", line 585, in start
    await self.connect(reconnect=reconnect)
  File "C:\Users\44794\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\client.py", line 499, in connect
    await self._connect()
  File "C:\Users\44794\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\client.py", line 463, in _connect
    await self.ws.poll_event()
  File "C:\Users\44794\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\gateway.py", line 471, in poll_event
    await self.received_message(msg)
  File "C:\Users\44794\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\gateway.py", line 425, in received_message
    func(data)
  File "C:\Users\44794\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\44794\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\state.py", line 725, in _get_create_guild
    guild._from_data(data)
  File "C:\Users\44794\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\guild.py", line 297, in _from_data
    self._sync(guild)
  File "C:\Users\44794\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\44794\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\channel.py", line 107, in __init__
    self._update(guild, data)
  File "C:\Users\44794\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\channel.py", line 131, in _update
    self._fill_overwrites(data)
  File "C:\Users\44794\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 looked up this issue and found a resolution to this problem - to just reinstall discord.py. So:

> pip uninstall discord

Another error:

Unable to create process using 'C:\Users\44794\aanaconda3\python.exe C:\Users\44794\aanaconda3\Scripts\pip-script.py uninstall discord'

I'm sure that once I have the solution to this issue, the other problems can be fixed easily. As always, I've only been properly using Python for two months or so. Please try to simplify the solution as best you can! Thanks in advance.

Jerry
  • 366
  • 4
  • 22
flitee
  • 15
  • 7

0 Answers0