0
votes

I get a syntax error when I try to import discord, everything works in vscode but not in cmd

C:\Users\anselm_lothar\Documents\Python\pythonProject\Event bot>main.py Traceback (most recent call last): File "C:\Users\anselm_lothar\Documents\Python\pythonProject\Event bot\main.py", line 4, in import discord File "C:\Users\anselm_lothar\AppData\Local\Programs\Python\Python38\lib\site-packages\discord_init_.py", line 25, in from .client import Client File "C:\Users\anselm_lothar\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\client.py", line 959 """ ^ SyntaxError: (unicode error) \N escapes not supported (can't load unicodedata module)

and my code is just

import discord
1
You need to put the error's text in your question rather than having a screenshot of it. - Random Davis
ok I edited my question - Tirterra
You appear to be running the wrong Python version. - user2357112 supports Monica
it works in vs code and I didn't cahnge anything to the version or something - Tirterra
when I print(sys.version") it says that I am in 3.8.5 so I really don't see why it doesn't work - Tirterra

1 Answers

0
votes

I first oppened the discord module and changed the code where the error occured, there was an issue with the '\N' not being in a substring,but I also got a new error :/(that had nothing to do with discord module).The _socket module was nowhere to be found so just reinstall python.