cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
51
Views
0
Helpful
0
Replies

Python API Serial Number Error UnknownTimezoneWarning

jseaman01111
Level 1
Level 1

I have written a Python script to gather various configuration stats about hardware claimed by Intersight using the Python API SDK. For one particular customer, I receive a warning "UnknownTimezoneWarning" when retrieving DIMM serial numbers. I have narrowed this down to the serial number field by using a Select string on my query and only selecting that single field. In this case, there are over 7,000 DIMM slots being queried, and fewer than 20 of them are generating this warning. I'm not sure why the serial number is being passed through the datetime parser, but it appears to be doing so. In these few cases, the serial number must look enough like an actual date time string that the parser is trying to use the trailing n characters as a timezone.

/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/dateutil/parser/_parser.py:1207: UnknownTimezoneWarning: tzname FBE identified but not understood.

DIMM Serial = 23A8FBE7

Why is a serial number string being parsed by datetime? And how can I avoid these warnings?

thanks

0 Replies 0

Review Cisco Networking for a $25 gift card