Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running bot #1594

Closed
kenbear101 opened this issue Sep 19, 2018 · 6 comments
Closed

Error when running bot #1594

kenbear101 opened this issue Sep 19, 2018 · 6 comments

Comments

@kenbear101
Copy link

kenbear101 commented Sep 19, 2018

About
My python bot was working normal, until i switched to PyCharm IDE and it messed with something that will make the bot to not start. I tried reinstalling python, discordpy but nothing works! I even deleted the files.

Error

Traceback (most recent call last):
  File "C:\Users\kenne\Desktop\rocketflare.py", line 2, in <module>
    import discord
  File "C:\Users\kenne\CodingFiles\lib\site-packages\discord\__init__.py", line 20, in <module>
    from .client import Client, AppInfo, ChannelPermissions
  File "C:\Users\kenne\CodingFiles\lib\site-packages\discord\client.py", line 38, in <module>
    from .state import ConnectionState
  File "C:\Users\kenne\CodingFiles\lib\site-packages\discord\state.py", line 36, in <module>
    from . import utils, compat
  File "C:\Users\kenne\CodingFiles\lib\site-packages\discord\compat.py", line 32
    create_task = asyncio.async
                              ^
SyntaxError: invalid syntax```
@Harmon758
Copy link
Contributor

First of all, if that's a real token and you forgot to remove it, you're going to want to change your token now.
This is a duplicate of #1249 and #1401.

@kenbear101
Copy link
Author

First of all, if that's a real token and you forgot to remove it, you're going to want to change your token now.
This is a duplicate of #1249 and #1401.

That ticket is outdated, and it is not mine. And the token used was outdated.

@Harmon758
Copy link
Contributor

Those issues are still relevant if you're trying to use the async branch with Python 3.7.
Note that this might be the case for you since PyCharm sets up a virtualenv by default.

@Bluenix2
Copy link
Contributor

It's a very simple problem. The error tells us that you have no module named discord but before it worked. That tells us that PyCharm has made a venv(short for virtual environment) in this venv you have not installed discord.py . To fix, either install discord.py through PyCharm in your venv or disable the venv.

@Harmon758
Copy link
Contributor

@bluephoenixgame They have discord.py installed.
This error occurs when using a PyPI version of the async branch with Python 3.7.

@Bluenix2
Copy link
Contributor

Hmm, yeah. Maybe the venv Is python 3.7

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

No branches or pull requests

3 participants