Q:

Can't use bot.run('TOKEN') - Discord.py

I've been creating this bot for 2 months then I stopped for 1 month. When I tried to run my bot again I always get this error (In the real code, I replace 'TOKEN' with real token.):
  File "main.py", line 10, in <module>
    bot.run('TOKEN')
  File "venv\lib\site-packages\discord\client.py", line 640, in run
    return future.result()
  File "venv\lib\site-packages\discord\client.py", line 621, in runner
    await self.start(*args, **kwargs)
  File "venv\lib\site-packages\discord\client.py", line 585, in start
    await self.connect(reconnect=reconnect)
  File "venv\lib\site-packages\discord\client.py", line 499, in connect
    await self._connect()
  File "venv\lib\site-packages\discord\client.py", line 463, in _connect
    await self.ws.poll_event()
  File "venv\lib\site-packages\discord\gateway.py", line 471, in poll_event
    await self.received_message(msg)
  File "venv\lib\site-packages\discord\gateway.py", line 425, in received_message
    func(data)
  File "venv\lib\site-packages\discord\state.py", line 750, in parse_guild_create
    guild = self._get_create_guild(data)
  File "venv\lib\site-packages\discord\state.py", line 725, in _get_create_guild
    guild._from_data(data)
  File "venv\lib\site-packages\discord\guild.py", line 297, in _from_data
    self._sync(guild)
  File "venv\lib\site-packages\discord\guild.py", line 328, in _sync
    self._add_channel(CategoryChannel(guild=self, data=c, state=self._state))
  File "venv\lib\site-packages\discord\channel.py", line 726, in __init__
    self._update(guild, data)
  File "venv\lib\site-packages\discord\channel.py", line 737, in _update
    self._fill_overwrites(data)
  File "venv\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'

This is my code:
import discord
from discord.ext import commands

bot = commands.Bot(command_prefix = ["ec!","Ec!","EC!","eC!"],case_insensitive=True)

@bot.event
async def on_ready():
    print('READY')

bot.run('TOKEN')

I've tried to fix this problem for a day.

A:

Had the same problem today, remove discord.py and reinstall. Helped me: Discord.py Glitch or random error: TypeError: __new__() got an unexpected keyword argument 'deny_new'
Go to the console or terminal and write this:
pip uninstall discord.py
pip install discord.py

I hope everything will work for you.

