Short-bus / pilomar

RaspberryPi based miniature observatory
https://shortbus.blog/
GNU General Public License v3.0
63 stars 14 forks source link

FindUSB fails if new USB memory stick has no label. #67

Closed Short-bus closed 2 weeks ago

Short-bus commented 4 months ago

Problem spotted by -PHU-

When I bought a new 32 GB stick recently, I ran into a certain weakness in pilomardisk.py.
A USB stick normally has four identifiers: amount of storage, file system, (own) serial ID and a label. This information is identified in pilomardisk.py by the process:  def FindUSB.
When a fresh USB device is introduced, this device carries no label. The program pilomardisk.py then crashes on line 164, as the fourth item is empty.
In Linux and Windows normally the label is shown, but in case the label is absent, the serial number is shown. I think pilomardisk.py needs such a provision too.

Review the way USB memory is recognised and used. For example, is it is simpler to rely upon the RPi always booting to the desktop in order to find and mount the memory?

Short-bus commented 3 months ago

Latest copy in development will default back to SD card storage and issues a warning with common causes if USB storage search fails unexpectedly.

Short-bus commented 2 weeks ago

2024-04 Development branch now merged. Closes this issue.