Skip to content
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

Won't Install on Python 2 #4

Open
ciolben opened this issue Mar 2, 2021 · 3 comments
Open

Won't Install on Python 2 #4

ciolben opened this issue Mar 2, 2021 · 3 comments
Labels
wontfix This will not be worked on

Comments

@ciolben
Copy link

ciolben commented Mar 2, 2021

Hello,

Thank you for your plugin. While installing from the repository or directly from the zip, it shows an error.
Config:
env.plugins.pi_support.model: Raspberry Pi 3 Model B Plus Rev 1.3
env.python.pip: 20.2
env.python.version: 2.7.16
env.python.virtualenv: true
octoprint.version: 1.5.3

Log:
2021-03-02 11:45:32,490 - octoprint.plugins.pluginmanager - INFO - Installing plugin from https://github.com/Willmac16/OctoPrint-TranslateModel/archive/main.zip
2021-03-02 11:45:32,970 - octoprint.plugin.core - INFO - Plugin Anonymous Usage Tracking is disabled.
2021-03-02 11:45:54,643 - octoprint.plugins.pluginmanager - ERROR - Could not install plugin from https://github.com/Willmac16/OctoPrint-TranslateModel/archive/main.zip
Traceback (most recent call last):
File "/home/pi/octoprint/OctoPrint/lib/python2.7/site-packages/octoprint/plugins/pluginmanager/init.py", line 738, in _command_install_archive
returncode, stdout, stderr = self._call_pip(pip_args)
File "/home/pi/octoprint/OctoPrint/lib/python2.7/site-packages/octoprint/plugins/pluginmanager/init.py", line 1414, in _call_pip
return self._pip_caller.execute(*args, **kwargs)
File "/home/pi/octoprint/OctoPrint/local/lib/python2.7/site-packages/octoprint/util/pip.py", line 209, in execute
return self.call(command, **kwargs)
File "/home/pi/octoprint/OctoPrint/local/lib/python2.7/site-packages/octoprint/util/commandline.py", line 243, in call
all_stderr += process_stderr(p.stderr.readlines(timeout=0.5))
File "/home/pi/octoprint/OctoPrint/local/lib/python2.7/site-packages/octoprint/util/commandline.py", line 239, in process_stderr
return process_lines(lines, self._log_stderr)
File "/home/pi/octoprint/OctoPrint/local/lib/python2.7/site-packages/octoprint/util/commandline.py", line 230, in process_lines
*map(lambda x: to_unicode(x, errors="replace"), lines)
File "/home/pi/octoprint/OctoPrint/local/lib/python2.7/site-packages/octoprint/util/pip.py", line 511, in _preprocess_lines
return list(map(self._preprocess, lines))
File "/home/pi/octoprint/OctoPrint/local/lib/python2.7/site-packages/octoprint/util/pip.py", line 530, in _preprocess
return to_unicode(clean_ansi(text))
File "/home/pi/octoprint/OctoPrint/local/lib/python2.7/site-packages/octoprint/util/commandline.py", line 57, in clean_ansi
return _ANSI_REGEX.sub(b"", line.encode("latin1")).decode("latin1")
UnicodeEncodeError: 'latin-1' codec can't encode character u'\u2018' in position 40: ordinal not in range(256)
2021-03-02 11:45:54,644 - octoprint.plugins.pluginmanager - ERROR - Reason: UnicodeEncodeError('latin-1', u' cc1plus: warning: command line option \u2018-Wstrict-prototypes\u2019 is valid for C/ObjC but not for C++\n', 40, 41, 'ordinal not in range(256)')
Traceback (most recent call last):
File "/home/pi/octoprint/OctoPrint/lib/python2.7/site-packages/octoprint/plugins/pluginmanager/init.py", line 738, in _command_install_archive
returncode, stdout, stderr = self._call_pip(pip_args)
File "/home/pi/octoprint/OctoPrint/lib/python2.7/site-packages/octoprint/plugins/pluginmanager/init.py", line 1414, in _call_pip
return self._pip_caller.execute(*args, **kwargs)
File "/home/pi/octoprint/OctoPrint/local/lib/python2.7/site-packages/octoprint/util/pip.py", line 209, in execute
return self.call(command, **kwargs)
File "/home/pi/octoprint/OctoPrint/local/lib/python2.7/site-packages/octoprint/util/commandline.py", line 243, in call
all_stderr += process_stderr(p.stderr.readlines(timeout=0.5))
File "/home/pi/octoprint/OctoPrint/local/lib/python2.7/site-packages/octoprint/util/commandline.py", line 239, in process_stderr
return process_lines(lines, self._log_stderr)
File "/home/pi/octoprint/OctoPrint/local/lib/python2.7/site-packages/octoprint/util/commandline.py", line 230, in process_lines
*map(lambda x: to_unicode(x, errors="replace"), lines)
File "/home/pi/octoprint/OctoPrint/local/lib/python2.7/site-packages/octoprint/util/pip.py", line 511, in _preprocess_lines
return list(map(self._preprocess, lines))
File "/home/pi/octoprint/OctoPrint/local/lib/python2.7/site-packages/octoprint/util/pip.py", line 530, in _preprocess
return to_unicode(clean_ansi(text))
File "/home/pi/octoprint/OctoPrint/local/lib/python2.7/site-packages/octoprint/util/commandline.py", line 57, in clean_ansi
return _ANSI_REGEX.sub(b"", line.encode("latin1")).decode("latin1")
UnicodeEncodeError: 'latin-1' codec can't encode character u'\u2018' in position 40: ordinal not in range(256)

@Hairybiker
Copy link

+1 same problem

2021-03-02 11:36:17,592 - octoprint.plugins.pluginmanager - ERROR - Could not install plugin from https://github.com/Willmac16/OctoPrint-TranslateModel/archive/main.zip
Traceback (most recent call last):
File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/pluginmanager/init.py", line 738, in _command_install_archive
returncode, stdout, stderr = self._call_pip(pip_args)
File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/pluginmanager/init.py", line 1414, in _call_pip
return self._pip_caller.execute(*args, **kwargs)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/pip.py", line 209, in execute
return self.call(command, **kwargs)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/commandline.py", line 244, in call
all_stdout += process_stdout(p.stdout.readlines(timeout=0.5))
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/commandline.py", line 236, in process_stdout
return process_lines(lines, self._log_stdout)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/commandline.py", line 230, in process_lines
*map(lambda x: to_unicode(x, errors="replace"), lines)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/pip.py", line 511, in _preprocess_lines
return list(map(self._preprocess, lines))
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/pip.py", line 530, in _preprocess
return to_unicode(clean_ansi(text))
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/commandline.py", line 57, in clean_ansi
return _ANSI_REGEX.sub(b"", line.encode("latin1")).decode("latin1")
UnicodeEncodeError: 'latin-1' codec can't encode character u'\u2018' in position 42: ordinal not in range(256)
2021-03-02 11:36:17,607 - octoprint.plugins.pluginmanager - ERROR - Reason: UnicodeEncodeError('latin-1', u' cc1plus: warning: command line option \u2018-Wstrict-prototypes\u2019 is valid for C/ObjC but not for C++\n', 42, 43, 'ordinal not in range(256)')
Traceback (most recent call last):
File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/pluginmanager/init.py", line 738, in _command_install_archive
returncode, stdout, stderr = self._call_pip(pip_args)
File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/pluginmanager/init.py", line 1414, in _call_pip
return self._pip_caller.execute(*args, **kwargs)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/pip.py", line 209, in execute
return self.call(command, **kwargs)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/commandline.py", line 244, in call
all_stdout += process_stdout(p.stdout.readlines(timeout=0.5))
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/commandline.py", line 236, in process_stdout
return process_lines(lines, self._log_stdout)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/commandline.py", line 230, in process_lines
*map(lambda x: to_unicode(x, errors="replace"), lines)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/pip.py", line 511, in _preprocess_lines
return list(map(self._preprocess, lines))
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/pip.py", line 530, in _preprocess
return to_unicode(clean_ansi(text))
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/commandline.py", line 57, in clean_ansi
return _ANSI_REGEX.sub(b"", line.encode("latin1")).decode("latin1")
UnicodeEncodeError: 'latin-1' codec can't encode character u'\u2018' in position 42: ordinal not in range(256)

@Willmac16
Copy link
Owner

This seems to be a python 2 specific install error, where whatever pip with python2 is doing to compile the c++ code is failing, but pip with python3 happily compiles and installs the code. I can try to look more into this in a bit, but I would recommend that you upgrade to python3 if you are able since python 2 is end of life.

@Hairybiker
Copy link

OK seems to be because I haven't updated the image only the octopi instance.
Updating the image now

@Willmac16 Willmac16 changed the title UnicodeEncodeError: 'latin-1' codec can't encode character Won't Install on Python 2 Mar 6, 2021
@Willmac16 Willmac16 added the wontfix This will not be worked on label Mar 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants