b3a283366c
The following error message is observed during chassis object being destroyed "Exception ignored in: <function Chassis.__del__ at 0x7fd22165cd08> Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/sonic_platform/chassis.py", line 83, in __del__ ImportError: sys.meta_path is None, Python is likely shutting down The chassis tries to import deinitialize_sdk_handle during being destroyed for the purpose of releasing the sdk_handle. However, importing another module during shutting down can cause the error because some of the fundamental infrastructures are no longer available." This error occurs when a chassis object is created and then destroyed in the Python shell. - How I did it To fix it, record the deinitialize_sdk_handle in the chassis object when sdk_handle is being initialized and call the deinitialize handler when the chassis object is being destroyed - How to verify it Manually test. |
||
---|---|---|
.. | ||
barefoot | ||
broadcom | ||
cavium | ||
centec | ||
centec-arm64 | ||
generic | ||
innovium | ||
marvell | ||
marvell-arm64 | ||
marvell-armhf | ||
mellanox | ||
nephos | ||
p4 | ||
pddf | ||
template | ||
vs |