OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

why does asyncio_ensure_future = asyncio.async raise a SyntaxError: invalid syntax [duplicate]

  • Thread starter Thread starter Hmm465
  • Start date Start date
H

Hmm465

Guest
I've been looking all over the the Internet and back for an answer, but nothing comes up.

I assume this may or may not be very rare. It seems I'm the only one with this probably to be honest.

Here's the error that comes up:

Code:
    import discord
  File "C:\Users\hmm46\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\hmm46\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\client.py", line 42, in <module>
    from .voice_client import VoiceClient
  File "C:\Users\hmm46\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\voice_client.py", line 43, in <module>
    import websockets
  File "C:\Users\hmm46\AppData\Local\Programs\Python\Python37-32\lib\site-packages\websockets\__init__.py", line 3, in <module>
    from .client import *
  File "C:\Users\hmm46\AppData\Local\Programs\Python\Python37-32\lib\site-packages\websockets\client.py", line 12, in <module>
    from .protocol import CONNECTING, OPEN, WebSocketCommonProtocol
  File "C:\Users\hmm46\AppData\Local\Programs\Python\Python37-32\lib\site-packages\websockets\protocol.py", line 17, in <module>
    from .compatibility import asyncio_ensure_future
  File "C:\Users\hmm46\AppData\Local\Programs\Python\Python37-32\lib\site-packages\websockets\compatibility.py", line 9
    from asyncio import async as asyncio_ensure_future
                        ^
SyntaxError: invalid syntax

I'm using python 3.7.0, the latest version.
<p>I've been looking all over the the Internet and back for an answer, but nothing comes up.</p>
<p>I assume this may or may not be very rare.
It seems I'm the only one with this probably to be honest.</p>
<p>Here's the error that comes up:</p>
<pre><code> import discord
File "C:\Users\hmm46\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\hmm46\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\client.py", line 42, in <module>
from .voice_client import VoiceClient
File "C:\Users\hmm46\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\voice_client.py", line 43, in <module>
import websockets
File "C:\Users\hmm46\AppData\Local\Programs\Python\Python37-32\lib\site-packages\websockets\__init__.py", line 3, in <module>
from .client import *
File "C:\Users\hmm46\AppData\Local\Programs\Python\Python37-32\lib\site-packages\websockets\client.py", line 12, in <module>
from .protocol import CONNECTING, OPEN, WebSocketCommonProtocol
File "C:\Users\hmm46\AppData\Local\Programs\Python\Python37-32\lib\site-packages\websockets\protocol.py", line 17, in <module>
from .compatibility import asyncio_ensure_future
File "C:\Users\hmm46\AppData\Local\Programs\Python\Python37-32\lib\site-packages\websockets\compatibility.py", line 9
from asyncio import async as asyncio_ensure_future
^
SyntaxError: invalid syntax
</code></pre>
<p>I'm using python 3.7.0, the latest version.</p>
 

Latest posts

S
Replies
0
Views
1
Sergey Bakaev Rettley
S
Top