repl.it

Error loading discord bot on startup. hosted through repl.it

僤鯓⒐⒋嵵緔 提交于 2020-08-09 19:35:33
问题 A couple days ago my discord bot suddenly went offline, i host my bot through repl.it and i cant get it to work as it gives a dirty error. Traceback (most recent call last): File "main.py", line 584, in <module> bot.run("NTg0NjkyODA1NTcwNjU4MzEz.XPOnmw.VpE_ILHaDdQ6k--OIBRovc1h80o") File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 640, in run return future.result() File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 621, in

Error loading discord bot on startup. hosted through repl.it

不问归期 提交于 2020-08-09 19:31:06
问题 A couple days ago my discord bot suddenly went offline, i host my bot through repl.it and i cant get it to work as it gives a dirty error. Traceback (most recent call last): File "main.py", line 584, in <module> bot.run("NTg0NjkyODA1NTcwNjU4MzEz.XPOnmw.VpE_ILHaDdQ6k--OIBRovc1h80o") File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 640, in run return future.result() File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 621, in

Using variables from other Python file

你离开我真会死。 提交于 2019-12-13 20:44:04
问题 I am making a little game thing in Python, I'm still fairly new to this. I am trying to access a variable in another file by using import, but it keeps saying AttributeError: module 'core temp' has no attribute 'ct' This is my code I am trying to run: elif cmd == "temp": if core.ct < 2000: print(colored("Core temperature: "+core.ct+"°C", "green")) elif core.ct < 4000: print(colored("Core temperature: "+core.ct+"°C", "yellow")) elif core.ct >= 3000: print(colored("Core temperature: "+core.ct+"