'NoneType' object has no attribute 'id'
See original GitHub issueI’ve seen this issue posted here multiple times and it is usually said to be an issue of the code but there is one from 10 days ago that seemed to not have an answer yet, so I’m thinking there still may be an issue in the code here?
Doing:
mgs = []
async for x in client.logs_from(client.get_channel('361683030932193281')):
mgs.append(x)
await client.delete_messages(mgs)
Getting “‘NoneType’ object has no attribute ‘id’”…
Tried doing it a multitude of different ways including having the get_channel code as it’s own line with a name and whatnot.
Traceback: https://i.imgur.com/z4ptQt3.png
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Nonetype object has no attribute 'id' - python - Stack Overflow
This occurs when the you try to get id Attribute from object which is of None type , Here is a case :...
Read more >'NoneType' object has no attribute 'id' - asdeasoft.net
Re: 'NoneType' object has no attribute 'id' ... AttributeError means that there was an Error that had to do with an Attribute request....
Read more >Getting 'NoneType' object has no attribute 'id' error - Reddit
Can you help me solve this issue described on the post title? I am getting this error with this specific code: latest =…...
Read more >AttributeError: 'NoneType' object has no attribute 'id' - Trac
Hey guys,. I receive an error using the latest stable version (0.12.2) that I did not find back in already existing bug reports....
Read more >'NoneType' object has no attribute 'user_id' - Odoo
Website admin config has an "AttributeError: 'NoneType' object has no attribute 'user_id'" ... Thanks for your subscription! Does anyone know how to correct...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
get_channel
returns None when a channel with the specified channel ID was not found in the cache. This raises some possibilities:wait_until_ready
, which sleeps the coroutine until all channels, guilds and members are available in cache.Judging by your last comment, I’m going to guess it’s the first one. Stick a
before your main code and see if it fixes the problem.
could u explain how to add this