blood-pressure-monitor
blood-pressure-monitor copied to clipboard
NoneType object is not subscriptable
On Ubuntu 22.04 I see for bpm_usb.py
Starting USB communication with Blood Pressure Monitor.
Error: 'NoneType' object is not subscriptable
This happens on line 101:
patient_id = self.get_patient_id();
How to resolve?
I cannot reproduce this one; setting and getting the patient id works for me.
Generally, for USB there are two things to consider:
- Install the
hid
module withpip3 install hid
and also install one of the required libraries; it did not work for me with Ubuntu'sapt install python3-hid
. - Get it to work first running as
root
. Once USB communication works forroot
add a rule under/etc/udev/rules.d/
to get it to work for non-root users.
Hope this helps.