#cannot import name 'NotRequired' from 'typing_extensions'
1 messages · Page 1 of 1 (latest)
Hi, 10 minutes ago I found out my bot has been offline since November 27, I don't use discord often anymore so that explains why I only saw it now. I opened my hosts console and saw this error: py Traceback (most recent call last): File "/home/container/mcdonalds.py", line 391, in <module> client.run("(my bots token here)") File "/home/container/discord/client.py", line 715, in run return future.result() File "/home/container/discord/client.py", line 694, in runner await self.start(*args, **kwargs) File "/home/container/discord/client.py", line 658, in start await self.connect(reconnect=reconnect) File "/home/container/discord/client.py", line 553, in connect await self.ws.poll_event() File "/home/container/discord/gateway.py", line 591, in poll_event await self.received_message(msg.data) File "/home/container/discord/gateway.py", line 541, in received_message func(data) File "/home/container/discord/state.py", line 1193, in parse_guild_create guild = self._get_create_guild(data) File "/home/container/discord/state.py", line 1157, in _get_create_guild guild._from_data(data) File "/home/container/discord/guild.py", line 487, in _from_data self.stickers: Tuple[GuildSticker, ...] = tuple( File "/home/container/discord/guild.py", line 488, in <lambda> map(lambda d: state.store_sticker(self, d), guild.get("stickers", [])) File "/home/container/discord/state.py", line 369, in store_sticker self._stickers[sticker_id] = sticker = GuildSticker(state=self, data=data) File "/home/container/discord/sticker.py", line 277, in __init__ self._from_data(data) File "/home/container/discord/sticker.py", line 420, in _from_data super()._from_data(data) File "/home/container/discord/sticker.py", line 284, in _from_data self.url: str = f"{Asset.BASE}/stickers/{self.id}.{self.format.file_extension}" File "/home/container/discord/enums.py", line 535, in file_extension return lookup[self] KeyError: <StickerFormatType.unknown_4: 4> which lead me to reinstall py-cord. After I did that
I got this error: py Traceback (most recent call last): File "/home/container/mcdonalds.py", line 1, in <module> import discord File "/home/container/discord/__init__.py", line 22, in <module> from ._version import * File "/home/container/discord/_version.py", line 32, in <module> from ._typed_dict import TypedDict File "/home/container/discord/_typed_dict.py", line 31, in <module> from typing_extensions import NotRequired, Required, TypedDict ImportError: cannot import name 'NotRequired' from 'typing_extensions' (/home/container/typing_extensions.py) Traceback (most recent call last): File "/home/container/camel.py", line 1, in <module> import discord File "/home/container/discord/__init__.py", line 22, in <module> from ._version import * File "/home/container/discord/_version.py", line 32, in <module> from ._typed_dict import TypedDict File "/home/container/discord/_typed_dict.py", line 31, in <module> from typing_extensions import NotRequired, Required, TypedDict ImportError: cannot import name 'NotRequired' from 'typing_extensions' (/home/container/typing_extensions.py)
and I can't seem to fix it
anyone know what I need to do? I didn't want to give up my bot because it is my first bot which did quite succesfull (I think it did) so I don't want to abandon it eventhough I don't use discord anymore
uhm yes
this is going to be quite messy
because its on my host which uses pterodactyl
and I made this bot when I was 13 so I never cleaned shit up in there
so all files are in 1 spot
uh
do you want to use discord.py or py-cord?
uninstall the discord stuff
done
what is the commands.txt?
so basically the hosts only lets me run 1 bot at a time
so in the index is a script that runs the python files in the commands.txt
I use a raspberry Pi for hosting my bot
ok?
anyways
so I deleted that
I installed the latest py-cord version from github
and I still get the typing_extensions error
done that
install py-cord-dev
still nothing