Enclosure Temperature in the Temp Graph Tab

Hello, I was able to switch to Dak0r's plugin with the enhanced Plotly graph plugin, and visually things look right. However, I'm no longer able to read the SI7021 sensor I have connected. When I was using the original Enclosure plugin, the sensor wasn't successfully communicating until I turned off the "Use SUDO" option. Now, I can't get the sensor to read with or without that setting, but I can confirm that I can communicate with the sensor using the system python installation still.

I can see that in the logs I have the exception

2021-02-28 18:43:04,377 - octoprint.plugins.enclosure - INFO - Failed to execute python scripts, try disabling use SUDO on advanced section of the plugin.
2021-02-28 18:43:04,378 - octoprint.plugins.enclosure - WARNING - An exception of type TypeError occurred on log_error. Arguments:
("a bytes-like object is required, not 'str'",)

Was this python 3 thing fixed in the main enclosure plugin, but not yet in the fork?

Thank you!

That would be my guess, but I don't know much about Dak0r's fork other than it would work with my plugin for the sensors they were using.

I cherry picked the fix from upstream[1], made a PR to Dak0r, and (edited out my fork) now it's merged into Dak0r's code, so you'll get this when you update!

I hope this helps anyone else using temp/humidity sensors that broke when octopi went to python 3 :slight_smile:

[1] Convert STDOUT from Popen's to UTF-8 by dgrnbrg Β· Pull Request #1 Β· Dak0r/OctoPrint-Enclosure-with-Custom-Graphs Β· GitHub