Python的unicode错误取决于我提供的路径?
我一直在通过SSH执行命令(启动IPython)时遇到了一些问题。 在排除故障时,我遇到了一些我无法理解的东西。 IPython启动或不依赖于我是否提供完整路径 - 这里出了什么问题?
/home/ubuntu/anaconda/bin/ipython notebook —-profile=server
...给我下面的错误,而:
~/anaconda/bin/ipython notebook --profile=server
......完美地加载IPython。
值得确认的是,当我通过键入cd进入我的主目录时,确实会得到/ home / ubuntu
全堆栈跟踪:
ubuntu @ ip-10-204-37-226:〜$ / home / ubuntu / anaconda / bin / ipython notebook --profile = server Traceback(最近调用最后一个):File“/ home / ubuntu / anaconda / bin / ipython ”,第6行,在sys.exit(start_ipython())文件“/home/ubuntu/anaconda/lib/python2.7/site-packages/IPython/ INIT py”为,线118,在返回start_ipython launch_new_instance(argv的= argv,** kwargs)文件“/home/ubuntu/anaconda/lib/python2.7/site-packages/IPython/config/application.py”,第544行,在launch_instance中app.initialize(argv)文件“”,行2,初始化文件“/home/ubuntu/anaconda/lib/python2.7/site-packages/IPython/config/application.py”,第89行,在catch_config_error返回方法(app,* args,** kwargs)文件“/home/ubuntu/anaconda/lib/python2.7/site-packages/IPython/terminal/ipapp.py”,行312,初始化超级(TerminalIPythonApp,self).initialize(argv)文件“”,第2行,在初始化文件“/home/ubuntu/anaconda/lib/python2.7/site-packages/IPython/config/application.py”,第89行,在catch_config_error返回方法(a pp,* args,** kwargs)初始化self.parse_command_line(argv)文件“/home/ubuntu/anaconda/lib/python2.7/site-packages/IPython/core/application.py”,第362行File“ /home/ubuntu/anaconda/lib/python2.7/site-packages/IPython/terminal/ipapp.py“,第307行,在parse_command_line中返回super(TerminalIPythonApp,self).parse_command_line(argv)文件”“,第2行,在parse_command_line文件中“/home/ubuntu/anaconda/lib/python2.7/site-packages/IPython/config/application.py”,第89行,在catch_config_error返回方法(app,* args,** kwargs)文件“/ home / ubuntu / anaconda / lib / python2.7 / site-packages / IPython / config / application.py“,第463行,在parse_command_line self.argv = list(argv)文件”/ home / ubuntu / anaconda / lib / python2 .7 / site-packages / IPython / utils / traitlets.py“,第315行,在set new_value = self._validate(obj,value)文件中”/home/ubuntu/anaconda/lib/python2.7/site-packages/ IPython / utils / traitlets.py“,第323行,在_validate中返回self.validate(obj,value)文件”/ home / ubuntu / anaconda / lib / python2。 7 / site-packages / IPython / utils / traitlets.py“,第1215行,在validate value = self.validate_elements(obj,value)文件中”/home/ubuntu/anaconda/lib/python2.7/site-packages/IPython /utils/traitlets.py“,第1291行,在validate_elements中返回super(List,self).validate_elements(obj,value)文件”/home/ubuntu/anaconda/lib/python2.7/site-packages/IPython/utils/ traitlets.py“,第1225行,在validate_elements中v = self._trait.validate(obj,v)文件”/home/ubuntu/anaconda/lib/python2.7/site-packages/IPython/utils/traitlets.py“,第1028行,验证返回unicode(值)UnicodeDecodeError:'ascii'编解码器无法解码位置0中的字节0xe2:序号不在范围内(128)
链接地址: http://www.djcxy.com/p/54765.html