Plugin Broken after updating Octopi to Python 3 #466

Open
opened 2022-01-08 12:28:30 +00:00 by stirlsilver · 0 comments
stirlsilver commented 2022-01-08 12:28:30 +00:00 (Migrated from github.com)

Hi All,
I had everything working well with respect to this plugin, but decided that it was time do the jump to Python 3 by updating Octopi to 0.18.0.

Since the update the temperature sensor (SI7021) has stopped working. Looking at the OctoPrint log I see the following error:
2022-01-07 22:17:07,383 - octoprint.plugins.enclosure - WARNING - An exception of type KeyError occurred on log_error. Arguments: ('temp_sensor_i2cbus',) Traceback (most recent call last): File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_enclosure/__init__.py", line 1002, in get_sensor_data temp, hum = self.read_si7021_temp(sensor['temp_sensor_address'], sensor['temp_sensor_i2cbus']) KeyError: 'temp_sensor_i2cbus' 2022-01-07 22:17:07,384 - octoprint.plugins.enclosure - WARNING - An exception of type TypeError occurred on log_error. Arguments: ('cannot unpack non-iterable NoneType object',) Traceback (most recent call last): File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_enclosure/__init__.py", line 811, in check_enclosure_temp temp, hum, airquality = self.get_sensor_data(sensor) TypeError: cannot unpack non-iterable NoneType object

Would anyone know how this can be resolved?

Hi All, I had everything working well with respect to this plugin, but decided that it was time do the jump to Python 3 by updating Octopi to 0.18.0. Since the update the temperature sensor (SI7021) has stopped working. Looking at the OctoPrint log I see the following error: `2022-01-07 22:17:07,383 - octoprint.plugins.enclosure - WARNING - An exception of type KeyError occurred on log_error. Arguments: ('temp_sensor_i2cbus',) Traceback (most recent call last): File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_enclosure/__init__.py", line 1002, in get_sensor_data temp, hum = self.read_si7021_temp(sensor['temp_sensor_address'], sensor['temp_sensor_i2cbus']) KeyError: 'temp_sensor_i2cbus' 2022-01-07 22:17:07,384 - octoprint.plugins.enclosure - WARNING - An exception of type TypeError occurred on log_error. Arguments: ('cannot unpack non-iterable NoneType object',) Traceback (most recent call last): File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_enclosure/__init__.py", line 811, in check_enclosure_temp temp, hum, airquality = self.get_sensor_data(sensor) TypeError: cannot unpack non-iterable NoneType object ` Would anyone know how this can be resolved?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Gandalf/OctoPrint-Enclosure#466