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

Can't import discord #2033

Closed
3 tasks done
ravi0lii opened this issue Mar 30, 2019 · 2 comments
Closed
3 tasks done

Can't import discord #2033

ravi0lii opened this issue Mar 30, 2019 · 2 comments
Labels
duplicate This is a duplicate of another issue or PR.

Comments

@ravi0lii
Copy link

Summary

When I try to import discord.py using import discord, I just get the output you can see below.

Reproduction Steps

Install discord.py using pip.
Then, I just open a python shell and type import discord.

Expected Results

I should be able to normally import discord.py without any errors.

Actual Results

>>> import discord
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/moritz/Documents/Projects/discord-account-bot2/venv/lib/python3.7/site-packages/discord/__init__.py", line 20, in <module>
    from .client import Client, AppInfo, ChannelPermissions
  File "/home/moritz/Documents/Projects/discord-account-bot2/venv/lib/python3.7/site-packages/discord/client.py", line 38, in <module>
    from .state import ConnectionState
  File "/home/moritz/Documents/Projects/discord-account-bot2/venv/lib/python3.7/site-packages/discord/state.py", line 36, in <module>
    from . import utils, compat
  File "/home/moritz/Documents/Projects/discord-account-bot2/venv/lib/python3.7/site-packages/discord/compat.py", line 32
    create_task = asyncio.async
                              ^
SyntaxError: invalid syntax

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.

System Information

  • discord.py version: 0.16.12
  • Python version: 3.7.2
  • Operating system: Arch Linux
@laggycomputer
Copy link
Contributor

laggycomputer commented Mar 30, 2019

This problem's fix is already in this repo, but not on PyPi. Try reinstalling with pip3 install git+https://github.com/Rapptz/discord.py@async -U.

If you encounter errors about git not being installed (unlikely, you are on linux), try pip3 install https://github.com/Rapptz/discord.py/archive/async.zip -U.

For further help, kindly join the support server at https://discord.gg/r3sSKJJ.

@Harmon758
Copy link
Contributor

Duplicate of #1249 and #1401

@dpy-manager-bot dpy-manager-bot added the duplicate This is a duplicate of another issue or PR. label Mar 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This is a duplicate of another issue or PR.
Projects
None yet
Development

No branches or pull requests

4 participants