Python unicode error dependent on the path I supply?
I have been having some issues executing a command (launching IPython) over SSH. In troubleshooting it, I've come across something I can't understand. IPython either launches or doesn't dependent on whether I supply the full path or not - what's going wrong here?
/home/ubuntu/anaconda/bin/ipython notebook —-profile=server
...gives me the errors below, while:
~/anaconda/bin/ipython notebook --profile=server
...loads IPython flawlessly.
It's worth confirming that when I go to my home directory by typing cd, I do indeed get /home/ubuntu
Full stack trace:
ubuntu@ip-10-204-37-226:~$ /home/ubuntu/anaconda/bin/ipython notebook —-profile=server Traceback (most recent call last): File "/home/ubuntu/anaconda/bin/ipython", line 6, in sys.exit(start_ipython()) File "/home/ubuntu/anaconda/lib/python2.7/site-packages/IPython/ init .py", line 118, in start_ipython return launch_new_instance(argv=argv, **kwargs) File "/home/ubuntu/anaconda/lib/python2.7/site-packages/IPython/config/application.py", line 544, in launch_instance app.initialize(argv) File "", line 2, in initialize File "/home/ubuntu/anaconda/lib/python2.7/site-packages/IPython/config/application.py", line 89, in catch_config_error return method(app, *args, **kwargs) File "/home/ubuntu/anaconda/lib/python2.7/site-packages/IPython/terminal/ipapp.py", line 312, in initialize super(TerminalIPythonApp, self).initialize(argv) File "", line 2, in initialize File "/home/ubuntu/anaconda/lib/python2.7/site-packages/IPython/config/application.py", line 89, in catch_config_error return method(a pp, *args, **kwargs) File "/home/ubuntu/anaconda/lib/python2.7/site-packages/IPython/core/application.py", line 362, in initialize self.parse_command_line(argv) File "/home/ubuntu/anaconda/lib/python2.7/site-packages/IPython/terminal/ipapp.py", line 307, in parse_command_line return super(TerminalIPythonApp, self).parse_command_line(argv) File "", line 2, in parse_command_line File "/home/ubuntu/anaconda/lib/python2.7/site-packages/IPython/config/application.py", line 89, in catch_config_error return method(app, *args, **kwargs) File "/home/ubuntu/anaconda/lib/python2.7/site-packages/IPython/config/application.py", line 463, in parse_command_line self.argv = list(argv) File "/home/ubuntu/anaconda/lib/python2.7/site-packages/IPython/utils/traitlets.py", line 315, in set new_value = self._validate(obj, value) File "/home/ubuntu/anaconda/lib/python2.7/site-packages/IPython/utils/traitlets.py", line 323, in _validate return self.validate(obj, value) File "/home/ubuntu/anaconda/lib/python2. 7/site-packages/IPython/utils/traitlets.py", line 1215, in validate value = self.validate_elements(obj, value) File "/home/ubuntu/anaconda/lib/python2.7/site-packages/IPython/utils/traitlets.py", line 1291, in validate_elements return super(List, self).validate_elements(obj, value) File "/home/ubuntu/anaconda/lib/python2.7/site-packages/IPython/utils/traitlets.py", line 1225, in validate_elements v = self._trait.validate(obj, v) File "/home/ubuntu/anaconda/lib/python2.7/site-packages/IPython/utils/traitlets.py", line 1028, in validate return unicode(value) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128)
链接地址: http://www.djcxy.com/p/54766.html