When an update_gopigo3.sh install to Bullseye fails, the “check_if_firmware_upgrade_needed” will fail instantiating a GoPiGo3 because the setuptools was not present to install the gopigo3 egg files. When that instantiation fails because of the missing modules, the check executes the exception clause which improperly states “Firmware Upgrade Is Needed”
try:
g = gopigo3.GoPiGo3()
current_firmware = g.get_version_firmware()
if current_firmware == available_firmware:
print(f"\nThe GoPiGo is already running the latest firmare: {current_firmware}. \nAn upgrade is not needed at this time.\n")
exit(1)
except Exception as e:
print(e)
print("Firmware upgrade is needed")
exit(0)
While the end of the installation does give an error, many folks do not seem to read it.
GOPIGO3 SOFTWARE INSTALLATION FAILURE: +Traceback (most recent call last): File "<string>", line 1, in <module> ModuleNotFoundError: No module named 'gopigo3'
Suggest installing over Legacy Pi OS (Buster).
...
if current_firmware == available_firmware:
print(f"\nThe GoPiGo is already running the latest firmware: {current_firmware}. \nAn upgrade is not needed at this time.\n")
exit(1)
else:
# print("Firmware upgrade is needed")
print(f"\nThe GoPiGo3 is running firmware: {current_firmware}. An upgrade to {available_firmware} is needed.\n")
exit(0)
except Exception as e:
print(e)
exit(0)
When an update_gopigo3.sh install to Bullseye fails, the “check_if_firmware_upgrade_needed” will fail instantiating a GoPiGo3 because the setuptools was not present to install the gopigo3 egg files. When that instantiation fails because of the missing modules, the check executes the exception clause which improperly states “Firmware Upgrade Is Needed”
While the end of the installation does give an error, many folks do not seem to read it.
======== Suggestion for check_if_firmware_update_is_needed.py move the firmware upgrade needed notice to an else clause: