Python Console not always importing project to sys.path
I seem to be randomly running into a problem where upon running the python console from PyCharm it will not include my project path in the sys.path.extend command that it issues. I can't find any pattern to it - I can run it over and over without making any changes to my project and sometimes it will include it, sometimes it won't. Anyone else had this issue or know a way around it before I go filing a bug?
These are run one after the other with about 5 seconds in between.
Try 1:
C:\Python27\python.exe -u C:\Program Files (x86)\JetBrains\PyCharm 2.0\helpers\pydev\pydevconsole.py 6762 6763
PyDev console: using IPython 0.11
import sys; print('Python %s on %s' % (sys.version, sys.platform))
Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)] on win32
sys.path.extend(['C:\\Program Files (x86)\\JetBrains\\PyCharm 2.0\\helpers'])
Try 2:
C:\Python27\python.exe -u C:\Program Files (x86)\JetBrains\PyCharm 2.0\helpers\pydev\pydevconsole.py 6778 6779
PyDev console: using IPython 0.11
import sys; print('Python %s on %s' % (sys.version, sys.platform))
Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)] on win32
sys.path.extend(['C:\\Program Files (x86)\\JetBrains\\PyCharm 2.0\\helpers'])
Try 3:
C:\Python27\python.exe -u C:\Program Files (x86)\JetBrains\PyCharm 2.0\helpers\pydev\pydevconsole.py 6798 6799
PyDev console: using IPython 0.11
import sys; print('Python %s on %s' % (sys.version, sys.platform))
Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)] on win32
sys.path.extend(['C:\\Program Files (x86)\\JetBrains\\PyCharm 2.0\\helpers'])
Try 4:
C:\Python27\python.exe -u C:\Program Files (x86)\JetBrains\PyCharm 2.0\helpers\pydev\pydevconsole.py 6808 6809
PyDev console: using IPython 0.11
import sys; print('Python %s on %s' % (sys.version, sys.platform))
Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)] on win32
sys.path.extend(['C:\\Program Files (x86)\\JetBrains\\PyCharm 2.0\\helpers', 'C:\\Users\\kevin\\PycharmProjects\\address_tools'])
Try 5:
C:\Python27\python.exe -u C:\Program Files (x86)\JetBrains\PyCharm 2.0\helpers\pydev\pydevconsole.py 6941 6943
PyDev console: using IPython 0.11
import sys; print('Python %s on %s' % (sys.version, sys.platform))
Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)] on win32
sys.path.extend(['C:\\Program Files (x86)\\JetBrains\\PyCharm 2.0\\helpers', 'C:\\Users\\kevin\\PycharmProjects\\address_tools'])
Try 6:
C:\Python27\python.exe -u C:\Program Files (x86)\JetBrains\PyCharm 2.0\helpers\pydev\pydevconsole.py 6969 6970
PyDev console: using IPython 0.11
import sys; print('Python %s on %s' % (sys.version, sys.platform))
Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)] on win32
sys.path.extend(['C:\\Program Files (x86)\\JetBrains\\PyCharm 2.0\\helpers', 'C:\\Users\\kevin\\PycharmProjects\\address_tools'])
...etc
Please sign in to leave a comment.
It seems that when this is occuring I can click into the project pane and then run the Python Console command and it will properly import my project into the path, but I can't confirm that it's always happening this way.
Nothing?
Hi Kevin!
Sorry for delay in answering. Described behaivour looks like a bug, so I've created an issue http://youtrack.jetbrains.net/issue/PY-5622 to investigate the problem.