Particularly for the cutover validation tool. When running it against a device inventory which contains devices unassigned to a site, the tool will return error:
Error fetching device <serial_no>: 'NoneType' object has no attribute 'upper'
I wrote a simple error catcher that logs this to errorlog.txt in the working directory.
Upon further investigation, the API endpoint being used to get device status:
v1/device-inventory?search=<serial_no>
Returns two values that explain the error:
"status": null,
"siteId": null
Some logic to interpret this and guide the user to adding the device to a site would be helpful. Perhaps an error catching py module could be used to easily provide this across anything using the pycentral modules.
Particularly for the cutover validation tool. When running it against a device inventory which contains devices unassigned to a site, the tool will return error:
Error fetching device <serial_no>: 'NoneType' object has no attribute 'upper'
I wrote a simple error catcher that logs this to errorlog.txt in the working directory.
Upon further investigation, the API endpoint being used to get device status:
v1/device-inventory?search=<serial_no>Returns two values that explain the error:
"status": null,"siteId": nullSome logic to interpret this and guide the user to adding the device to a site would be helpful. Perhaps an error catching py module could be used to easily provide this across anything using the pycentral modules.