Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception raised when running script in external terminal #3155

Closed
jitseniesen opened this issue May 4, 2016 · 0 comments
Closed

Exception raised when running script in external terminal #3155

jitseniesen opened this issue May 4, 2016 · 0 comments

Comments

@jitseniesen
Copy link
Member

Description

If I try to run a script in an external terminal, an exception is raised.

What steps will reproduce the problem?

  1. Write a Python script (contents do not matter)
  2. Click "Configure" in the "Run" menu.
  3. In the window that appears, pick "Execute in external system terminal" and uncheck the other options.
  4. Press the "Run" button.

What is the expected output? What do you see instead?

The script does not run. Instead, the traceback below is printed in the external console (I abbreviated the paths). The issue occurs in both 3.0.0b2 and the current git revision.

Traceback (most recent call last):
  File "(...)/site-packages/spyderlib/plugins/editor.py", line 2082, in edit_run_configurations
    self.run_file()
  File "(...)/site-packages/spyderlib/plugins/editor.py", line 2129, in run_file
    self.re_run_file()
  File "(...)/site-packages/spyderlib/plugins/editor.py", line 2172, in re_run_file
    systerm, post_mortem)
  File "(...)/site-packages/spyderlib/spyder.py", line 2483, in open_external_console
    interact, debug, python_args)
  File "(...)/site-packages/spyderlib/utils/programs.py", line 183, in run_python_script_in_terminal
    cwd=wdir)
  File "(...)/site-packages/spyderlib/utils/programs.py", line 64, in run_program
    subprocess.Popen([path]+args, cwd=cwd)
  File "(...)/subprocess.py", line 950, in __init__
    restore_signals, start_new_session)
  File "(...)/subprocess.py", line 1544, in _execute_child
    raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: ''

Version and main components

  • Spyder Version: 3.0.0b2
  • Python Version: 3.5.1
  • Qt Versions: 4.8.7, PyQt4 (API v2) 4.11.4 on Linux

Dependencies

pyflakes >=0.6.0   :  1.1.0 (OK)
pep8 >=0.6         :  1.7.0 (OK)
pygments >=1.6     :  2.1.1 (OK)
IPython >=3.0      :  4.1.2 (OK)
zmq >=13.0.0       :  15.2.0 (OK)
qtconsole >=4.0    :  4.1.1 (OK)
pandas >=0.13.1    :  0.17.1 (OK)
numpy >=1.7        :  1.10.4 (OK)
sphinx >=0.6.6     :  1.3.5 (OK)
psutil >=0.3       :  4.1.0 (OK)
rope >=0.9.4       :  0.9.4-1 (OK)
jedi >=0.8.1;<0.9.0:  0.9.0 (NOK)
matplotlib >=1.0   :  1.5.1 (OK)
sympy >=0.7.3      :  0.7.6.1 (OK)
pylint >=0.25      :  1.5.4 (OK)
@ccordoba12 ccordoba12 added this to the v3.0beta4 milestone May 14, 2016
jitseniesen added a commit to jitseniesen/spyder that referenced this issue Jun 9, 2016
Fixes issue spyder-ide#3155: Executing a python script in external terminal without
specifying a working directory leads to wdir = '', which is not handled
correctly.

In the previous version, the working directory was passed as an option
to the script if xterm is used. This did not make sense to me, so I
removd that.
jitseniesen added a commit to jitseniesen/spyder that referenced this issue Jun 9, 2016
Fixes spyder-ide#3155: Executing a python script in external terminal without
specifying a working directory leads to wdir = '', which is not handled
correctly.

In the previous version, the working directory was passed as an option
to the script if xterm is used. This did not make sense to me, so I
removd that.
@ccordoba12 ccordoba12 modified the milestones: v3.1, v3.0beta4 Jun 9, 2016
jitseniesen added a commit to jitseniesen/spyder that referenced this issue Jun 10, 2016
Fixes spyder-ide#3155: Executing a python script in external terminal without
specifying a working directory leads to wdir = '', which is not handled
correctly.

In the previous version, the working directory was passed as an option
to the script if xterm is used. This did not make sense to me, so I
removd that.
jitseniesen added a commit to jitseniesen/spyder that referenced this issue Jun 11, 2016
Fixes spyder-ide#3155: Executing a python script in external terminal without
specifying a working directory leads to wdir = '', which is not handled
correctly.

In the previous version, the working directory was passed as an option
to the script if xterm is used. This did not make sense to me, so I
removd that.
@ccordoba12 ccordoba12 modified the milestones: v3.0beta4, v3.1 Jun 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants