Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

error with starting #44

Open
cry8wolf9 opened this issue Dec 16, 2018 · 6 comments
Open

error with starting #44

cry8wolf9 opened this issue Dec 16, 2018 · 6 comments

Comments

@cry8wolf9
Copy link

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

@PokeSvorlds
Copy link
Collaborator

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.

@cry8wolf9
Copy link
Author

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
Copy link
Author

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!

@natsupy
Copy link

natsupy commented Jan 10, 2019

cause discord python only works on python 3.6, not 3.7

@IchiiDev
Copy link

IchiiDev commented Nov 6, 2019

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'

@Eyr0
Copy link

Eyr0 commented Apr 2, 2020

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"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants