AttributeError: 'str' object has no attribute 'loop'
See original GitHub issueI’m attempting to run my bot when every time i try to start it I get the error:
Traceback (most recent call last):
File "C:\Users\h0r1zonZ\Desktop\A\B\C\regular\DEFENDER.py", line 53, in <module>
Bot.run(token)
File "C:\Program Files (x86)\Python36-32\lib\site-packages\discord\client.py", line 543, in run
loop = self.loop
AttributeError: 'str' object has no attribute 'loop'
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Discord Bot-AttributeError: 'str' object has no attribute 'loop'
You're not making an instance of it. client = MyClient() mind the () at the end. Also your events won't work because you...
Read more >'str' object has no attribute 'contains' ( Solved )
Solve the attributerror 'str' object has no attribute 'contains' error by using the" in " operator instead of the contains() method.
Read more >AttributeError: 'str' object has no attribute 'get'
how to solve 'str' object has no attribute 'get' error while trying to execute this code: sns.countplot(x='Survived', data='train').
Read more >Loop error (AttributeError: 'NoneType' object has no attribute ...
AttributeError : 'NoneType' object has no attribute 'keys' I have a simple routine with just an image and text, and a loop without...
Read more >AttributeError("'str' object has no attribute 'read'") - SyntaxFix
This error is caused when you tried to run a method within a string. String has a few methods, but not the one...
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
This was my top Google result for “discord.py has no attribute loop”, which I searched because I ran into:
AttributeError: '<class 'client.RobohorseClient'>' object has no attribute 'loop'
In case some other wayward soul is googling for this error, I had forgotten to callsuper().__init__()
in my Client subclass.You’re not using the instance of the class. You’re using the type itself.
It’s:
Not:
Please learn some more Python before attempting to make a bot.