Seite 1 von 1

Python - Discord

Verfasst: Montag 2. Juli 2018, 13:35
von gamenTV
Hey ich versuche momentan einen Discord bot zu schreiben mir irwie funktioniert itwas nicht mit dem importieren kann mir jemand vll anhand der Fehler sagen woran es liegt? Danke im Voraus und noch einen schönen Tag :D

Traceback (most recent call last):
File "C:/Users/capwa/Desktop/Bots/testbot2/main.py", line 3, in <module>
import discord
File "D:\Python\lib\site-packages\discord__init__.py", line 20, in <module>
from .client import Client, AppInfo, ChannelPermissions
File "D:\Python\lib\site-packages\discord\client.py", line 38, in <module>
from .state import ConnectionState
File "D:\Python\lib\site-packages\discord\state.py", line 36, in <module>
from . import utils, compat
File "D:\Python\lib\site-packages\discord\compat.py", line 32
create_task = asyncio.async
^
SyntaxError: invalid syntax

Process finished with exit code 1

Re: Python - Discord

Verfasst: Montag 2. Juli 2018, 14:27
von __blackjack__
@gamenTV: Welche Python-Version und wo kommt das `discord`-Package her?

Re: Python - Discord

Verfasst: Montag 2. Juli 2018, 15:04
von gamenTV
__blackjack__ hat geschrieben: Montag 2. Juli 2018, 14:27 @gamenTV: Welche Python-Version und wo kommt das `discord`-Package her?
Ich benutze die neuste version von Python und das discord-Package öhh also jemand meinte es reicht wenn ich in cmd in den Ordner gehe und dann den command "pip install discord.py" ausführe

Re: Python - Discord

Verfasst: Montag 2. Juli 2018, 16:30
von __blackjack__
Dann ist Dein Python zu neu: https://github.com/Rapptz/discord.py/issues/1249

``async`` ist ab Python 3.7 ein Schlüsselwort und kann deshalb nicht mehr als Name verwendet werden.