Python unicode错误取决于我提供的路径?

时间:2013-12-04 07:29:22

标签: python ubuntu python-2.7

我在使用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 =服务器Traceback(最近一次调用最后一次):文件   “/ home / ubuntu / anaconda / bin / ipython”,第6行,in       sys.exit(start_ipython())文件“/home/ubuntu/anaconda/lib/python2.7/site-packages/IPython/init.py”,   第118行,在start_ipython中       return 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中       return方法(app,* args,** kwargs)文件“/home/ubuntu/anaconda/lib/python2.7/site-packages/IPython/terminal/ipapp.py”,   第312行,初始化       super(TerminalIPythonApp,self).initialize(argv)文件“”,第2行,初始化文件   “/home/ubuntu/anaconda/lib/python2.7/site-packages/IPython/config/application.py”   第89行,在catch_config_error中       return方法(app,* args,** kwargs)文件“/home/ubuntu/anaconda/lib/python2.7/site-packages/IPython/core/application.py”,   第362行,初始化       self.parse_command_line(argv)文件“/home/ubuntu/anaconda/lib/python2.7/site-packages/IPython/terminal/ipapp.py”,   第307行,在parse_command_line中       在parse_command_line文件中返回super(TerminalIPythonApp,self).parse_command_line(argv)文件“”,第2行   “/home/ubuntu/anaconda/lib/python2.7/site-packages/IPython/config/application.py”   第89行,在catch_config_error中       return方法(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行,设置       new_value = self._validate(obj,value)文件“/home/ubuntu/anaconda/lib/python2.7/site-packages/IPython/utils/traitlets.py”,   第323行,在_validate中       return self.validate(obj,value)File“/home/ubuntu/anaconda/lib/python2.7/site-packages/IPython/utils/traitlets.py”,   第1215行,在验证中       value = self.validate_elements(obj,value)文件“/home/ubuntu/anaconda/lib/python2.7/site-packages/IPython/utils/traitlets.py”,   第1291行,在validate_elements中       return super(List,self).validate_elements(obj,value)File“/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(value)UnicodeDecodeError:'ascii'编解码器无法解码位置0的字节0xe2:序数不在范围内(128)

0 个答案:

没有答案