Problems running/debugging script: IOError: [Errno 2] No such file or directory: '

已回答

I've created a new project. I edited the configuration to identify the interpreter, script and working directory.
The script won't launch (either run or debug) reporting that:

/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 ~/PycharmProjects/r2iif/rebates2iif.py
/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file '~/PycharmProjects/r2iif/rebates2iif.py': [Errno 2] No such file or directory

Process finished with exit code 2
----------------
I can run the script successfully from a terminal window as below:

/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 ~/PycharmProjects/r2iif/rebates2iif.py
----------------
The debugger fails with:

Connected to pydev debugger (build 163.10154.50)
Traceback (most recent call last):
File "/Applications/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 1596, in <module>
globals = debugger.run(setup['file'], None, None, is_module)
File "/Applications/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 974, in run
pydev_imports.execfile(file, globals, locals) # execute the script
IOError: [Errno 2] No such file or directory: '~/PycharmProjects/r2iif/rebates2iif.py'
----------------------------
I successfully completed a previous project that involved remote debugging/execution on an AWS server; permissions are the same on the files that ran successfully and the one that won't. I'm trying to run this project locally on my Mac. Also tried with no difference in result:
: clearing PYTHONPATH environment var.
: starting a fresh project from scratch and pasting source rather than opening existing file

Any suggestions?

0

Duplicate of the support request. The problem was solved by defining the absolute path to the script in the corresponding Run Configuration.

0

Hi Anna, I'm sure you understand what "defining the absolute path to the script in the corresponding Run Configuration" but unless we are as experienced as you or unless we work for JetBrains thats just a word salad.

Can you describe how to implement or fix the "Run Configuration"?

Otherwise your post is about as clear as this...

"The problem were regulators of regeneration and hematopoeitic stem cell differentiation validated by learned regulators"

Thats technically an accurate answer to a problem but unless you have a Masters/PhD in Microbiology its not much help in solving the problem.

0

@andrew

Go to Run | Edit Configurations.... and make sure your run configuration has the correct Script Path speicfied.

0

请先登录再写评论。