Spyder: runfile with path containing apostrophe will not work

Created on 6 Dec 2016  路  2Comments  路  Source: spyder-ide/spyder

Description of your problem

Running Spyder Python code with F5 causes issues

What steps will reproduce the problem?

  1. Create a python file in a directory where path has apostrophe
  2. Run Code

What is the expected output? What do you see instead?
Expect code to run. See this instead:

runfile('D:/Jordan/'s Files/Documents/Dropbox/Coding/Project Euler/prob19.py', wdir='D:/Jordan/'s Files/Documents/Dropbox/Coding/Project Euler')
File "", line 1
runfile('D:/Jordan/'s Files/Documents/Dropbox/Coding/Project Euler/prob19.py', wdir='D:/Jordan/'s Files/Documents/Dropbox/Coding/Project Euler')
^
SyntaxError: invalid syntax

Please provide any additional information below
I notice that if I run my code out of a path that doesn't include apostrophe, that my code will run. Example: "C:/code" is a directory where things work.

Versions and main components

  • Spyder Version: 3.0.2
  • Python Version: Python Anaconda. Python 2.7.12
  • Operating system: Win 10 64 bit

Dependencies

Please go to the menu entry Help > Optional Dependencies (or
Help > Dependencies), press the button Copy to clipboard
and paste the contents below:

jedi >=0.8.1 : 0.9.0 (OK)
matplotlib >=1.0 : 1.5.1 (OK)
nbconvert >=4.0 : 4.2.0 (OK)
numpy >=1.7 : 1.11.1 (OK)
pandas >=0.13.1 : 0.18.1 (OK)
pep8 >=0.6 : 1.7.0 (OK)
pyflakes >=0.5.0 : 1.2.3 (OK)
pygments >=2.0 : 2.1.3 (OK)
pylint >=0.25 : 1.5.4 (OK)
qtconsole >=4.2.0: 4.2.1 (OK)
rope >=0.9.4 : 0.9.4 (OK)
sphinx >=0.6.6 : 1.4.1 (OK)
sympy >=0.7.3 : 1.0 (OK)

Windows IPython Console Completed Bug

All 2 comments

Thanks for reporting. we'll fix this for Spyder 3.1.

@dalthviz, please work on this one.

Sorry @dalthviz, let's assign this one to Camilo.

@camendoza94, please work on this one.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Khalilsqu picture Khalilsqu  路  3Comments

hgijeon picture hgijeon  路  3Comments

cchu08 picture cchu08  路  3Comments

spyder-bot picture spyder-bot  路  3Comments

hedeqing picture hedeqing  路  3Comments