Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pycharm: Run manage task won't work if path contains space

I'm running Pycharm 2.6.3 with python 2.7 and django 1.5.1. When I try to run django's manage.py task from Pycharm (Tools / Run manage.py task), syncdb, for instance, I get the following:

bash -cl "/usr/bin/python2.7 /home/paulo/bin/pycharm-2.6.3/helpers/pycharm/django_manage.py syncdb /home/paulo/Projetos/repo2/Paulo Brito/phl"
Traceback (most recent call last):
  File "/home/paulo/bin/pycharm-2.6.3/helpers/pycharm/django_manage.py", line 21, in <module>
    run_module(manage_file, None, '__main__', True)
  File "/usr/lib/python2.7/runpy.py", line 170, in run_module
    mod_name, loader, code, fname = _get_module_details(mod_name)
  File "/usr/lib/python2.7/runpy.py", line 103, in _get_module_details
    raise ImportError("No module named %s" % mod_name)
ImportError: No module named manage

Process finished with exit code 1

If I run the first line on the console passing project path between single quotes, it runs without problems, like this:

bash -cl "/usr/bin/python2.7 /home/paulo/bin/pycharm-2.6.3/helpers/pycharm/django_manage.py syncdb '/home/paulo/Projetos/repo2/Paulo Brito/phl'"

I tried to format the path like that in project settings / django support, but Pycharm won't recognize the path.

How can I work in PyCharm with paths with spaces?

Thanks.

EDIT 1 PyCharm dont recognize path with baskslash as valid path either.

like image 555
Paulo Brito Avatar asked Aug 07 '13 11:08

Paulo Brito


2 Answers

it's known bug http://youtrack.jetbrains.com/issue/PY-8449

Fixed in PyCharm 2.7

like image 128
ktisha Avatar answered Nov 03 '22 05:11

ktisha


In UNIX you can escape whitespaces with a backslash:

/home/paulo/Projetos/repo2/Paulo\ Brito/phl
like image 37
knbk Avatar answered Nov 03 '22 06:11

knbk