Hi, Your problem is exactly the same as described here: http://groups.google.com/group/spyderlib/browse_thread/thread/299e11c6e677b277
Let's continue this conversation there. -Pierre On Mar 7, 3:50 pm, Hugo Silva <[email protected]> wrote: > Hi Pierre, > > First of all I'd like to thank you very much for the support regarding this > question. > > I've followed your instructions, however, the report resulting from the '-v' > option is consistently causing my Spyder to crash for reasons I couldn't yet > determine. > > Nonetheless, I was able to trace the following error during the modules > importing process: > > import spyderplugins # precompiled from > /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packag > es/spyderplugins/__init__.pyc > Traceback (most recent call last): > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", > line 500, in execsitecustomize > import sitecustomize > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/spyderlib/widgets/externalshell/sitecustomize.py", line 70, in <module> > loc = locale.getdefaultlocale() > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py" , > line 496, in getdefaultlocale > return _parse_localename(localename) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py" , > line 428, in _parse_localename > raise ValueError, 'unknown locale: %s' % localename > ValueError: unknown locale: UTF-8 > > Do you have any additional hint to what may be the problem in this case? > Thank you once again. > > Best regards, > Hugo Silva > > On Mar 6, 2011, at 6:35 PM, Pierre Raybaut wrote: > > > > > > > > > Hi, > > > The "KeyError: 'SPYDER_ENCODING'" error is just a consequence of the > > real error which is happening in Spyder's sitecustomize.py. The > > sitecustomize module is executed by the Python interpreter before > > executing your own scripts (in your example, the executed script is > > Spyder's startup.py module in which IPython is executed). > > > To see the traceback associated with the "real error" mentioned above, > > you must add the '-v' option as the Python interpreter is warning you > > (see the first message which is printed out in console: "'import > > sitecustomize' failed; use -v for traceback"). > > > You may do so within Spyder by doing the following: > > 1. create a new empty script > > 2. run it in a dedicated Python interpreter (i.e. with the F5 > > shortcut, with default run configuration settings): you should see the > > same error message: 'import sitecustomize' failed; use -v for > > traceback > > 3. now, edit the run configuration settings by pressing F6 > > 4. add the option -v to the Python interpreter command line options > > 5. re-run the script by pressing F5: you should have a complete report > > including the traceback > > > (note that there may be a lot of lines, so you may have to increase > > the Console maximum line count in Preferences > Console -- default > > value is 300, you may increase it up to 10000 for example --> this > > will be the new default value in next Spyder releases) > > > HTH, > > Pierre > > > On 5 mar, 23:42, Hugo Silva <[email protected]> wrote: > >> Dear all, > > >> I've just installed Spyder on a Mac OS X 10.6 with Python 2.7 and when > >> I start Spyder, on the IPython window I get the following: > > >> 'import sitecustomize' failed; use -v for traceback > >> Cannot read termcap database; > >> using dumb terminal settings. > >> Cannot read termcap database; > >> using dumb terminal settings. > >> Cannot read termcap database; > >> using dumb terminal settings. > >> Leopard libedit detected. > >> ------------------------------------------------------------ > >> Traceback (most recent call last): > >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/ > >> python2.7/site-packages/spyderlib/widgets/externalshell/startup.py", > >> line 177, in <module> > >> __ipythonshell__.IP.stdin_encoding = os.environ['SPYDER_ENCODING'] > >> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/ > >> python2.7/UserDict.py", line 23, in __getitem__ > >> raise KeyError(key) > >> KeyError: 'SPYDER_ENCODING' > > >> I'd really like to start using Spyder since it really seem to be great > >> for Python development, however this problem is preventing me from > >> using it at all. > > >> Best regards, > >> Hugo Silva > > > -- > > You received this message because you are subscribed to the Google Groups > > "spyder" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group > > athttp://groups.google.com/group/spyderlib?hl=en. -- You received this message because you are subscribed to the Google Groups "spyder" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/spyderlib?hl=en.
