I am running the latest Octoprint on a RPI5/Bookworm.
I notice that I am getting the following error message in my octoprint.log
file, repeated approximately ONCE A SECOND!!!!
2024-06-03 19:32:54,153 - octoprint.util.comm - ERROR - Could not scan /dev for serial ports on the system
Traceback (most recent call last):
File "/home/myuser/octoprint/venv/lib/python3.11/site-packages/octoprint/util/comm.py", line 212, in serialList
The relevant code in comm.py
is:
def serialList():
if os.name == "nt":
candidates = []
try:
key = winreg.OpenKey(
winreg.HKEY_LOCAL_MACHINE, "HARDWARE\\DEVICEMAP\\SERIALCOMM"
)
i = 0
while True:
candidates += [winreg.EnumValue(key, i)[1]]
i += 1
except Exception:
pass
else:
candidates = []
try:
with os.scandir("/dev") as it:
for entry in it:
if regex_serial_devices.match(entry.name):
candidates.append(entry.path)
except Exception:
logging.getLogger(__name__).exception(
"Could not scan /dev for serial ports on the system"
)
...
Looking back on historical logs, this problem started occurring in mid-March.
I am not aware of any changes that occurred then.
Not sure if this is relevant, but I run and always have run octoprint in user space (non-root) without any problems.