Discord-Werewolf icon indicating copy to clipboard operation
Discord-Werewolf copied to clipboard

error with starting

Open cry8wolf9 opened this issue 6 years ago • 6 comments

i seem to get this error when ever i start up the bot

SyntaxError: invalid syntax Restarting Bot.. File "bot.py", line 80 async def on_ready():

im running the bot on a google windows cloud server any help would be awesome

cry8wolf9 avatar Dec 16 '18 07:12 cry8wolf9

I believe you need to run the bot with python3 instead of python since only version 3.0 and up have async, or something like that. It worked for me to literally just use "python3" instead of the command "python" but I can't promise that'll work.

PokeSvorlds avatar Dec 16 '18 16:12 PokeSvorlds

I believe you need to run the bot with python3 instead of python since only version 3.0 and up have async, or something like that. It worked for me to literally just use "python3" instead of the command "python" but I can't promise that'll work.

that did not work unfortunally. im also getting a new error now

Active code page: 65001

Traceback (most recent call last):
  File "bot.py", line 1, in <module>
    import discord
  File "C:\Users\cry8wolf9\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\__init__.py", line 20, in <module>
    from .client import Client, AppInfo, ChannelPermissions
  File "C:\Users\cry8wolf9\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\client.py", line 38, in <module>
    from .state import ConnectionState
  File "C:\Users\cry8wolf9\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\state.py", line 36, in <module>
    from . import utils, compat
  File "C:\Users\cry8wolf9\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\compat.py", line 32
    create_task = asyncio.async
                              ^
SyntaxError: invalid syntax

i also get this when installing the requirements txt
discord-py 0.16.12 has requirement aiohttp<1.1.0,>=1.0.0, but you'll have aiohttp 3.4.4 which is incompatible.

cry8wolf9 avatar Dec 16 '18 18:12 cry8wolf9

i figured it out it turns out that the bot does not work with the newest version on python. It may be a good idea to add that in the description!

cry8wolf9 avatar Dec 18 '18 07:12 cry8wolf9

cause discord python only works on python 3.6, not 3.7

natsupy avatar Jan 10 '19 16:01 natsupy

I'll need to update this issue unfortunately, I have python 3.6 installed (in local, I will host it later on a python 3.7 or 3.8). And the bot sends me this everytime I launch it

Logged in as
WyvernBeta
632651106413182976
------
Ignoring exception in on_ready
Traceback (most recent call last):
  File "C:\Users\EnderKiller06\AppData\Local\Programs\Python\Python36\lib\site-packages\discord\client.py", line 242, in _run_event
    await coro(*args, **kwargs)
  File "C:\Data\Devellopement\BotDiscord\Discord-Werewolf-master\bot.py", line 91, in on_ready
    for role in client.get_server(WEREWOLF_SERVER).role_hierarchy:
AttributeError: 'Client' object has no attribute 'get_server'

IchiiDev avatar Nov 06 '19 17:11 IchiiDev

This requires Python3.6 and Discord.py 0.16.x (I use 0.16.12)

You can install 0.16.12 via this command "pip install discorc.py==0.16.12"

Eyr0 avatar Apr 02 '20 01:04 Eyr0