You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(I'm new to both Python and Spyder, so I apologise if my terminology isn't correct)
Spyder 3.2.6 is unable to pass paths for working directories that contain a single quote to the IPython interpreter. I use my uni OneDrive account which has a single quote in the path that I cannot change.
What steps will reproduce the problem?
Click on the folder icon at the top right of the title bar (Windows 10).
Select a path with a folder containing a single quote, e.g.
C:\Users\xxxx\OneDrive - Queen's University Belfast\test
IPython console throws an error. If I copy and paste the command shown in the error message then either (i) escape the single quote or (ii) change the path string to being enclosed in double quotes, it seems to work--e.g.:
get_ipython().kernel.set_cwd(u'C:\Users\xxxx\OneDrive - Queen's University Belfast\test')
(N.b. there is a backslash before the single quote in "Queen's" in the line above--it seems to get stripped by the webpage "Queen\'s")
OR
get_ipython().kernel.set_cwd(u"C:\Users\xxxx\OneDrive - Queen's University Belfast\test")
What is the expected output? What do you see instead?
File "", line 1
get_ipython().kernel.set_cwd(u'C:\Users\xxxx\OneDrive - Queen's University Belfast\test')
^
SyntaxError: invalid syntax
Many thanks, it’s working now in 3.2.8
Paul
From: Cheryl Sabella <notifications@github.com>
Sent: 27 February 2018 22:21
To: spyder-ide/spyder <spyder@noreply.github.com>
Cc: Paul Wilson <Paul.Wilson@qub.ac.uk>; Author <author@noreply.github.com>
Subject: Re: [spyder-ide/spyder] Setting a path containing a single quote (#6451)
I wasn't sure how to create a test for this, but I was able to recreate it. With the patch in place, the output in the console looks like:
In [1]: import os
In [2]: os.getcwd()
Out[2]: "/home/cheryl/spyder/cheryl's"
This output cannot be created without the patch.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#6451 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AiyE0_MEh73A6XMiHQvXQ-0MSK2-zYDjks5tZH_QgaJpZM4SFAKp>.
Description
(I'm new to both Python and Spyder, so I apologise if my terminology isn't correct)
Spyder 3.2.6 is unable to pass paths for working directories that contain a single quote to the IPython interpreter. I use my uni OneDrive account which has a single quote in the path that I cannot change.
What steps will reproduce the problem?
Click on the folder icon at the top right of the title bar (Windows 10).
Select a path with a folder containing a single quote, e.g.
C:\Users\xxxx\OneDrive - Queen's University Belfast\test
IPython console throws an error. If I copy and paste the command shown in the error message then either (i) escape the single quote or (ii) change the path string to being enclosed in double quotes, it seems to work--e.g.:
get_ipython().kernel.set_cwd(u'C:\Users\xxxx\OneDrive - Queen's University Belfast\test')
(N.b. there is a backslash before the single quote in "Queen's" in the line above--it seems to get stripped by the webpage "Queen\'s")
OR
get_ipython().kernel.set_cwd(u"C:\Users\xxxx\OneDrive - Queen's University Belfast\test")
What is the expected output? What do you see instead?
File "", line 1
get_ipython().kernel.set_cwd(u'C:\Users\xxxx\OneDrive - Queen's University Belfast\test')
^
SyntaxError: invalid syntax
Please provide any additional information below
Version and main components
Dependencies
The text was updated successfully, but these errors were encountered: