L
L
LURKYZ2018-08-26 07:47:55
Python
LURKYZ, 2018-08-26 07:47:55

Debugging a project in Python does not start, what should I do?

Good day inhabitants of the Toaster!
Not so long ago, I decided to discover a new platform for myself - Windows 10, since the new car did not have drivers for my favorite seven. Previously, my base was on another wheelbarrow (Just on the seven) and all projects were mainly created on it, there were no problems. I program in Python because of its compactness and cross-platform, as well as the ability to deploy projects on heroku hosting (So do not suggest rewriting projects in another language!).
When I imported all my projects to the new platform, rearranged the Python (With the variable set to PATH) and the libraries used for the projects, as well as VSCode, while debugging the bot for the Discord server, the debug console displayed this:

Traceback (most recent call last):
File "c:\Users\User\Desktop\Bots Developing\Discord Bot\programm.py", line 13, in
import discord
File "C:\Users\CENSURED\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\__init__.py", line 20, in
from .client import Client, AppInfo, ChannelPermissions
File "C:\Users\CENSURED\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\client.py", line 38, in
from .state import ConnectionState
File "C:\Users\CENSURED\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\state.py", line 36, in
from . import utils, compat
File "C:\Users\CENSURED\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\compat.py", line 32
create_task = asyncio.async
^
SyntaxError: invalid syntax

I decided to look for a similar problem on foreign forums, but the Internet doesn’t know everything as it turned out)
(Well, or I didn’t search well) The funny thing is that projects are still being launched on the old wheelbarrow!
Now I don’t know what to think, is this a new feature of Windows or is something preventing VSCode from starting debugging on Python?
Thanks in advance for any ideas and suggestions!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikolay Baryshnikov, 2019-05-19
@p141592

It looks like you have the wrong version of Python. Should be version 3.
Type in console:
python -V

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question