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

Fresh install fails on Python 3.8 #164

Closed
ScalyDragon opened this issue Jan 24, 2021 · 13 comments
Closed

Fresh install fails on Python 3.8 #164

ScalyDragon opened this issue Jan 24, 2021 · 13 comments

Comments

@ScalyDragon
Copy link

What were you doing?

  1. Fresh install on a 3.8 venv
  2. Install the plugin

What did you expect to happen?

Clean install.

What happened instead?

Failed.

Version of OctoPrint-PSUControl

0.1.10

Operating System running OctoPrint

Ubuntu 20.10

Printer model & used firmware incl. version

Irrelevant

Link to octoprint.log with octoprnt.plugins.psucontrol set to DEBUG

https://gist.github.com/Raptoaaah/af791aef0c606dd80c7fcd476eaac73d

Wiring diagram

Irrelevant

@ping-localhost
Copy link

I'm having the same issue using OctoPi for Raspberry Pi 4 8GB, 64bits.

2021-02-23 19:49:04,503 - octoprint.plugins.pluginmanager - ERROR - Could not install plugin from https://github.com/kantlivelong/OctoPrint-PSUControl/archive/master.zip
Traceback (most recent call last):
  File "/home/pi/oprint/lib/python3.8/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/python3.8/site-packages/octoprint/plugins/pluginmanager/__init__.py", line 1414, in _call_pip
    return self._pip_caller.execute(*args, **kwargs)
  File "/home/pi/oprint/lib/python3.8/site-packages/octoprint/util/pip.py", line 209, in execute
    return self.call(command, **kwargs)
  File "/home/pi/oprint/lib/python3.8/site-packages/octoprint/util/commandline.py", line 243, in call
    all_stderr += process_stderr(p.stderr.readlines(timeout=0.5))
  File "/home/pi/oprint/lib/python3.8/site-packages/octoprint/util/commandline.py", line 239, in process_stderr
    return process_lines(lines, self._log_stderr)
  File "/home/pi/oprint/lib/python3.8/site-packages/octoprint/util/commandline.py", line 229, in process_lines
    processed = self._preprocess_lines(
  File "/home/pi/oprint/lib/python3.8/site-packages/octoprint/util/pip.py", line 511, in _preprocess_lines
    return list(map(self._preprocess, lines))
  File "/home/pi/oprint/lib/python3.8/site-packages/octoprint/util/pip.py", line 530, in _preprocess
    return to_unicode(clean_ansi(text))
  File "/home/pi/oprint/lib/python3.8/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 '\u2018' in position 31: ordinal not in range(256)
2021-02-23 19:49:04,504 - octoprint.plugins.pluginmanager - ERROR - Reason: UnicodeEncodeError('latin-1', '  source/c_gpio.c: In function ‘setup’:\n', 31, 32, 'ordinal not in range(256)')
Traceback (most recent call last):
  File "/home/pi/oprint/lib/python3.8/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/python3.8/site-packages/octoprint/plugins/pluginmanager/__init__.py", line 1414, in _call_pip
    return self._pip_caller.execute(*args, **kwargs)
  File "/home/pi/oprint/lib/python3.8/site-packages/octoprint/util/pip.py", line 209, in execute
    return self.call(command, **kwargs)
  File "/home/pi/oprint/lib/python3.8/site-packages/octoprint/util/commandline.py", line 243, in call
    all_stderr += process_stderr(p.stderr.readlines(timeout=0.5))
  File "/home/pi/oprint/lib/python3.8/site-packages/octoprint/util/commandline.py", line 239, in process_stderr
    return process_lines(lines, self._log_stderr)
  File "/home/pi/oprint/lib/python3.8/site-packages/octoprint/util/commandline.py", line 229, in process_lines
    processed = self._preprocess_lines(
  File "/home/pi/oprint/lib/python3.8/site-packages/octoprint/util/pip.py", line 511, in _preprocess_lines
    return list(map(self._preprocess, lines))
  File "/home/pi/oprint/lib/python3.8/site-packages/octoprint/util/pip.py", line 530, in _preprocess
    return to_unicode(clean_ansi(text))
  File "/home/pi/oprint/lib/python3.8/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 '\u2018' in position 31: ordinal not in range(256)

@kantlivelong
Copy link
Owner

Which version of RPi.GPIO is installed in the venv?

@ping-localhost
Copy link

@kantlivelong Sorry for the late reply, was waiting for my print to finish. Not sure what you are looking for. If I'm reading these logs correctly, installing RPi.GPIO itself failed? Here is the full gist if that helps: https://gist.github.com/ping-localhost/aad12f9619b13deaf5e2d6810407a0f5

@cp2004
Copy link

cp2004 commented Feb 23, 2021

I'm having the same issue using OctoPi for Raspberry Pi 4 8GB, 64bits.

Is this the ubuntu server based version? Some GPIO issues are being looked at at the moment, since it didn't include some of the right stuff.

Edit: Also note that the 64 bit builds are not known for their stability...

@ping-localhost
Copy link

ping-localhost commented Feb 23, 2021

Is this the ubuntu server based version? Some GPIO issues are being looked at at the moment, since it didn't include some of the right stuff.

Yes, it's based on Ubuntu according to the issue in OctoPi. Maybe I should report it there as well? 🤔

Edit: Also note that the 64 bit builds are not known for their stability...

Of course, I expected at least something to not work. 😜

@ScalyDragon
Copy link
Author

Would also be nice to know if this is even related to the plugin or if the underlying parser is messed up - UnicodeEncodeError could also be a problem of the pluginmanager failing at handling \u2018 and \u2019 characters while using unicode. Maybe even changing the encoding may be necessary at some point if this is escalating.

@kantlivelong
Copy link
Owner

kantlivelong commented Feb 23, 2021

Do other plugins which depend on RPI.GPIO work? Try https://github.com/catgiggle/OctoPrint-GpioControl

Tag: catgiggle/OctoPrint-GpioControl#13

@ScalyDragon
Copy link
Author

Fails as well.

@kantlivelong
Copy link
Owner

For now going to mark this as invalid since it appears to be an upstream issue. Are you able to test on 32bit?

@ping-localhost
Copy link

@kantlivelong PSU control worked fine on the 32bit nightly build I used before.

@kantlivelong
Copy link
Owner

kantlivelong commented Feb 24, 2021

@kantlivelong PSU control worked fine on the 32bit nightly build I used before.

Yeah so it's def a 64bit issue. Also just took a look at the issue tracker for RPi.GPIO and these came up:

You may be able to use the periphery_gpio branch which adds GPIO support through Periphery but that won't remove the dependency for RPi.GPIO for a while. I've been using it for a short while without issue. If you want to use it you would need to strip out rpi.gpio from the requirements.txt. Do be aware that the Pi pull up/down resistor support does not work yet as kernel support is still being worked on.

@kantlivelong
Copy link
Owner

27e66a2 in devel brings in Periphery support and yanks out RPi.GPIO. Not released yet but expect it to come.

@kantlivelong
Copy link
Owner

v1.0.0 released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants