I've had this bot running no problems for over 2weeks

egg-boss
HOBBY

5 months ago

Starting Container

Traceback (most recent call last):

File "/app/main.py", line 195, in

[client.run](client.run)(f"{user_token}")

File "/opt/venv/lib/python3.12/site-packages/discord/client.py", line 631, in run

return future.result()

       ^^^^^^^^^^^^^^^

File "/opt/venv/lib/python3.12/site-packages/discord/client.py", line 610, in runner

await self.start(*args, **kwargs)

File "/opt/venv/lib/python3.12/site-packages/discord/client.py", line 574, in start

await self.connect(reconnect=reconnect)

File "/opt/venv/lib/python3.12/site-packages/discord/client.py", line 477, in connect

await [self.ws](self.ws).poll_event()

File "/opt/venv/lib/python3.12/site-packages/discord/gateway.py", line 547, in poll_event

await self.received_message([msg.data](msg.data))

File "/opt/venv/lib/python3.12/site-packages/discord/gateway.py", line 497, in received_message

func(data)

File "/opt/venv/lib/python3.12/site-packages/discord/state.py", line 485, in parsereadysupplemental

user.settings = Settings(data=data.get('user_settings', {}), state=self)

                ^^^^^^^^^^^^^^^^^^^^^^^^^^

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/opt/venv/lib/python3.12/site-packages/discord/enums.py", line 282, in fromdict

all = data.get('all')

      ^^^^^^^^

AttributeError: 'NoneType' object has no attribute 'get'

^

File "/opt/venv/lib/python3.12/site-packages/discord/settings.py", line 115, in init

self.friend_source_flags = FriendFlags._from_dict(data.get('friend_source_flags'))

                           ^^^^^^

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View Deploy details

> ⓘ Deployment information is only viewable by project members and Railway employees.

18 Replies

youllneverknow
HOBBY

5 months ago

Getting the exact same issue, too. Had it running for weeks without issue until last night.


youllneverknow

Getting the exact same issue, too. Had it running for weeks without issue until last night.

egg-boss
HOBBY

5 months ago

Have no clue what caused it either didn't change anything with tokens or my main.py


egg-boss

Have no clue what caused it either didn't change anything with tokens or my main.py

youllneverknow
HOBBY

5 months ago

Discord selfbot? Seems to be some update to Discord's API that might just be coincidental, but I've made no changes to my code and getting the same AttributeError


youllneverknow

Discord selfbot? Seems to be some update to Discord's API that might just be coincidental, but I've made no changes to my code and getting the same AttributeError

egg-boss
HOBBY

5 months ago

If you find a fix please share


5 months ago

egg-boss, what version of Python do you use to run this app locally?


egg-boss

If you find a fix please share

youllneverknow
HOBBY

5 months ago

Likewise!


brody

egg-boss, what version of Python do you use to run this app locally?

youllneverknow
HOBBY

5 months ago

It seems like Discord updated something and by the looks of it, they're trying to run a selfbot on Discord. Could the two be related?


egg-boss

If you find a fix please share

youllneverknow
HOBBY

5 months ago

I got it working, mate.

Create a Requirements.txt file

Copy this into the file

discord.py-self==2.0.0

Flask>=2.0

gunicorn>=20.0

requests>=2.0

Hope it helps


Status changed to Solved brody 5 months ago


Status changed to Open egg-boss 5 months ago


youllneverknow

I got it working, mate.Create a Requirements.txt fileCopy this into the filediscord.py-self==2.0.0Flask>=2.0gunicorn>=20.0requests>=2.0Hope it helps

egg-boss
HOBBY

5 months ago

Traceback (most recent call last):

File "/app/main.py", line 195, in <module>

client.run(f"{user_token}")

File "/opt/venv/lib/python3.12/site-packages/discord/client.py", line 631, in run

return future.result()

^^^^^^^^^^^^^^^

File "/opt/venv/lib/python3.12/site-packages/discord/client.py", line 610, in runner

await self.start(*args, **kwargs)

File "/opt/venv/lib/python3.12/site-packages/discord/client.py", line 574, in start

await self.connect(reconnect=reconnect)

File "/opt/venv/lib/python3.12/site-packages/discord/client.py", line 477, in connect

await self.ws.poll_event()

File "/opt/venv/lib/python3.12/site-packages/discord/gateway.py", line 547, in poll_event

await self.received_message(msg.data)

File "/opt/venv/lib/python3.12/site-packages/discord/gateway.py", line 497, in received_message

func(data)

File "/opt/venv/lib/python3.12/site-packages/discord/state.py", line 485, in parse_ready_supplemental

user.settings = Settings(data=data.get('user_settings', {}), state=self)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


egg-boss
HOBBY

5 months ago

Keep getting this my friend help me with this code back in 2022 so trying my best


egg-boss

Keep getting this my friend help me with this code back in 2022 so trying my best

youllneverknow
HOBBY

5 months ago

Are you running it through a repository on Github? And if so, create that requirements.txt file?

The issue you were initially getting was due to an update to Discords api. Creating a .txt adding adding the lines I gave should have solved it


youllneverknow

Are you running it through a repository on Github? And if so, create that requirements.txt file?The issue you were initially getting was due to an update to Discords api. Creating a .txt adding adding the lines I gave should have solved it

egg-boss
HOBBY

5 months ago

Yea h GitHub my bot also has a potery.lock & p project.toml could those need to be updated?


egg-boss

Yea h GitHub my bot also has a potery.lock & p project.toml could those need to be updated?

youllneverknow
HOBBY

5 months ago

No, you just need to create a text file.

Click the + add new file

Name the file

Requirements.txt

Cope and paste

discord.py-self==2.0.0

Flask>=2.0

gunicorn>=20.0

requests>=2.0

Commit changes


youllneverknow

No, you just need to create a text file.Click the + add new fileName the fileRequirements.txtCope and pastediscord.py-self==2.0.0Flask>=2.0gunicorn>=20.0requests>=2.0Commit changes

egg-boss
HOBBY

5 months ago

I did that no luck

Starting Container

Traceback (most recent call last):

File "/app/main.py", line 195, in <module>

client.run(f"{user_token}")

File "/opt/venv/lib/python3.12/site-packages/discord/client.py", line 631, in run

return future.result()

^^^^^^^^^^^^^^^

File "/opt/venv/lib/python3.12/site-packages/discord/client.py", line 610, in runner

await self.start(*args, **kwargs)

File "/opt/venv/lib/python3.12/site-packages/discord/client.py", line 574, in start

await self.connect(reconnect=reconnect)

File "/opt/venv/lib/python3.12/site-packages/discord/client.py", line 477, in connect

await self.ws.poll_event()

File "/opt/venv/lib/python3.12/site-packages/discord/gateway.py", line 547, in poll_event

await self.received_message(msg.data)

File "/opt/venv/lib/python3.12/site-packages/discord/gateway.py", line 497, in received_message

func(data)

File "/opt/venv/lib/python3.12/site-packages/discord/state.py", line 485, in parse_ready_supplemental

user.settings = Settings(data=data.get('user_settings', {}), state=self)

^^^^^^^^^^^^

If your willing I could add u as a colab if you don't mind taking a look


youllneverknow
HOBBY

5 months ago

Throw it into ChatGPT

I'm not a coder. ChatGPT is how I managed to get my working again lol


pzho8893
HOBBY

5 months ago

Im having the same issue. did you have any luck?


egg-boss

I did that no luckStarting ContainerTraceback (most recent call last):File "/app/main.py", line 195, in <module>client.run(f"{user_token}")File "/opt/venv/lib/python3.12/site-packages/discord/client.py", line 631, in runreturn future.result()^^^^^^^^^^^^^^^File "/opt/venv/lib/python3.12/site-packages/discord/client.py", line 610, in runnerawait self.start(*args, **kwargs)File "/opt/venv/lib/python3.12/site-packages/discord/client.py", line 574, in startawait self.connect(reconnect=reconnect)File "/opt/venv/lib/python3.12/site-packages/discord/client.py", line 477, in connectawait self.ws.poll_event()File "/opt/venv/lib/python3.12/site-packages/discord/gateway.py", line 547, in poll_eventawait self.received_message(msg.data)File "/opt/venv/lib/python3.12/site-packages/discord/gateway.py", line 497, in received_messagefunc(data)File "/opt/venv/lib/python3.12/site-packages/discord/state.py", line 485, in parse_ready_supplementaluser.settings = Settings(data=data.get('user_settings', {}), state=self)^^^^^^^^^^^^If your willing I could add u as a colab if you don't mind taking a look

selenalarana
FREE

5 months ago

did u get the solution T.T?


pzho8893

Im having the same issue. did you have any luck?

selenalarana
FREE

5 months ago

have u get any solution pro?