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
Sitecustomize fails when current directory has non-ascii chars #3407
Comments
I found, this only happens, when the working directory at the time of closing spyder has special characters (e.g. 'ß') somewhere in the path. |
Thanks for reporting. We'll fix this error after we release Spyder 3.0 :-) |
Hi @Dschoni I test your problem on my Linux Deepin machine (15.03 64 bits) Spyder & Python Enviroment
Dependences
As you can see, you could work with spyder 3.0.1 and our future release (v3.1). Because It solves your issue. @ccordoba12 @goanpeca Thanks for the report and contribute with us, to make better Spyder;). |
Well no. Create a folder with non-asci chars (e.g. 'äöüß'). Am 2016-10-22 21:52, schrieb malliwi88:
|
@dalthviz, please work on this one. For this you need to create a conda environment with a non-ascii name, install Spyder on it and start it. |
Hi @Dschoni, sorry for the late response, can you try to test the problem with Spyder All the information that you can give us would be greatly appreciated in order to recreate the error that you are having. :) |
Hi Daniel,
I have tried reproducing the problem with spyder 3.0.2 and it seems to be (nearly) gone.
I get the following traceback when I change the working directory:
Traceback (most recent call last):
File "/home/gu32hej/.local/lib/python2.7/site-packages/spyder/plugins/ipythonconsole.py", line 845, in set_current_client_working_directory
shellwidget.set_cwd(directory)
File "/home/gu32hej/.local/lib/python2.7/site-packages/spyder/widgets/ipythonconsole/shell.py", line 87, in set_cwd
"get_ipython().kernel.set_cwd(r'{}')".format(dirname))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xd6' in position 14: ordinal not in range(128)
Nevertheless, Spyder DOES start when I close it and open it again!
So, solved for me.
…________________________________
Von: Daniel Althviz Moré <notifications@github.com>
Gesendet: Sonntag, 4. Dezember 2016 22:32
An: spyder-ide/spyder
Cc: Schock, Jonathan; Mention
Betreff: Re: [spyder-ide/spyder] Sitecustomize fails when current directory has non-ascii chars (#3407)
Hi @Dschoni<https://github.com/Dschoni>, sorry for the late response, can you try to test the problem with Spyder 3.0.2?. Also, how are you setting up the active working directory, something like this?:
[image]<https://cloud.githubusercontent.com/assets/16781833/20867995/0bc55586-ba1f-11e6-9a7a-dd4dd484be43.png>
All the information that you can give us would be greatly appreciated in order to recreate the error that you are having. :)
-
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#3407 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AH3bawm5rpg0c8kKNxxedrmhcleviQVsks5rEzGGgaJpZM4J10sI>.
|
Sorry, no. It's back again. I tried with different bundled versions in Anaconda. With a plain Spyder install. 'import sitecustomize' failed; use -v for traceback |
Hi again @Dschoni, it's really strange that it worked for you (at least to close and open Spyder), and then it stopped working. Searching a little bit I think that maybe your problem is about the configuration of your firewall like in this post. From there are some steps that you can follow:
Can you see if following these steps make Spyder work again? I will open a new issue for the new error that you post when you ran Spyder |
?Hi Daniel,
Opening and closing Spyder works reliable. However, the import sitecustomize fails, with the aforementioned traceback.
The error is clearly "ordinal not in range" when closing spyder while in a working directory with non-ascii characters.
This leaves spyder in a "kind-of-working" state, but the internal python console doesn't work.
It is no matter of a firewall, as we are on Ubuntu without any firewall.
I'll send the full stack trace as soon as possible.
…________________________________
Von: Daniel Althviz Moré <notifications@github.com>
Gesendet: Freitag, 9. Dezember 2016 00:25
An: spyder-ide/spyder
Cc: Schock, Jonathan; Mention
Betreff: Re: [spyder-ide/spyder] Sitecustomize fails when current directory has non-ascii chars (#3407)
Hi again @Dschoni<https://github.com/Dschoni>, it's really strange that it worked for you (at least to close and open Spyder), and then it stopped working. Searching a little bit I think that maybe your problem is about the configuration of your firewall like in this post<http://stackoverflow.com/q/17258634>. From there are some steps that you can follow:
1. Disable the firewall.
2. Reset Spyder and apply default settings.
3. Run Spyder again.
4. Enable the firewall.
Can you see if following these steps make Spyder work again? I will open a new issue for the new error that you post when you ran Spyder 3.0.2. Also if you can use the -v option to print the traceback and paste it here would be great.
-
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#3407 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AH3ba-SjpClQJrqvOHBjtiCMU8FC-sguks5rGJHggaJpZM4J10sI>.
|
@Dschoni, to allow printing the sitecustomize traceback, please start Spyder like this in a terminal
|
Then the failure should be printed in our Python and IPython consoles. |
So, finally back at work, here is the more exact error description: I open Spyder, I change to a working directory (via GUI) that has special characters (in my case, the german version of 'Desktop', which is 'Arbeitsfläche'). As soon, as I do that, the debug shell throws the following exception: Traceback (most recent call last): When I close Spyder in this state and restart it (without resetting), the debug shell shows: Traceback (most recent call last): leading to a failing import of sitecustomize and therefore unstable internal console. Resetting solves the problem (as I guess, it resets the current working directory to a default, without special characters). |
Description
What steps will reproduce the problem?
What is the expected output? What do you see instead?
The internal python console shows the message "'import sitecustomize' failed"
and stops loading any further. No commands can be executed. After running
spyder --reset
it loads normally until the next startup after I had a file opened.
Please provide any additional information below
Version and main components
Optional dependencies
The text was updated successfully, but these errors were encountered: