我有AWS,我正在使用pychram-ssh-deployment连接到服务器
当我运行脚本(使用右键单击 - >运行,ctrl+shift+F10
)时,我收到以下错误。
ssh://user@xxx.xx.x.xx:22/data/anaconda/bin/python /home/user/.pycharm_helpers/pydev/pydev_run_in_console.py 0 0 C:/WC/trunk/content_dna/src/predict_hidden_layer.py
globals = run_file(file, None, None)
File "/home/user/.pycharm_helpers/pydev/pydev_run_in_console.py", line 35, in run_file
pydev_imports.execfile(file, globals, locals) # execute the script
File "/home/user/.pycharm_helpers/pydev/_pydev_imps/_pydev_execfile.py", line 11, in execfile
stream = tokenize.open(file) # @UndefinedVariable
File "/data/anaconda/lib/python3.5/tokenize.py", line 454, in open
buffer = _builtin_open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'C:/WC/trunk/content_dna/src/predict_hidden_layer.py'
Process finished with exit code 1
但是,如果我更改工作目录并将运行/调试配置脚本编写为\home\user\PycharmProjects\content_dna\src
\home\user\PycharmProjects\content_dna\src\get_imdb_keyword.py
这个剧本运行得很好。
我希望它是自动的,我尝试在三个地方添加路径映射:
现在奇怪的是,如果我尝试使用Debug(右键单击 - > Debug或Shift+F9
),则根本没有问题。
答案 0 :(得分:0)
你勾选了选项:之后显示命令行吗?我有类似的问题。但在解开这个选项之后,我的问题就解决了。