0

When I try to run server in django writing python manage.py runserver , python gives an error which is

C:\Users\Alim Írnek\AppData\Local\Programs\Python\Python39\python.exe: 
can't open file 'C:\Users\Alim Örnek\PycharmProjects\mysite\manage.py': 
[Errno 2] No such file or directory 

Is it because of spaces in my username or something else?

cizario
  • 3,995
  • 3
  • 13
  • 27
sociolog
  • 83
  • 1
  • 8
  • my guess: you are working on Windows and there's an issue with character encoding in your path: `Alim Írnek`, it's recommended to use english letters to avoid such encoding problems – cizario Sep 02 '21 at 13:47
  • got it but it is not possible for now for me to change this, another solution? – sociolog Sep 02 '21 at 13:55

2 Answers2

0

Is it possible it has something to do with the non-ASCII characters in your path?

even in the error code you posted the characters are different.

C:\Users\Alim Írnek\

vs.

C:\Users\Alim Örnek\

Wonder if python doesn't recognize those characters as valid paths or is converting them to ascii before reading the filepath and inserting different characters.

Jakemoyo
  • 171
  • 6
0

have a look at this thread it may give you a hint: Python not able to open file with non-english characters in path.

Note: Windows as OS is realy painfull for some developement (wait untill you have to install Magento2 on Windows !) but if you got stuck for long time i strongly recommend you to move to WSL2 on Windows 10, the best for now that Microsoft can do for devs like me and you.

ref: https://learn.microsoft.com/en-us/windows/wsl/install-win10

cizario
  • 3,995
  • 3
  • 13
  • 27