Error Module Collection When Using Python XNET Library

Updated Dec 15, 2023

Reported In

Hardware

  • CAN Interface Device

Driver

  • NI-XNET

Other

  • Python

Issue Details

I was trying to establish CAN Communication via Python using the NI XNET library. The Python XNET library version used is 0.3.2 version. However, I am not able to establish the communication, and the below error occurs. How do I resolve this?
image.png
 

Solution

This is a dependency issue caused by the XNET library using the collection library but later version the collection library was moved to collections.abc library.

You need to update the XNET library in the .py file of the directory mentioned in the error. For example, open the .py file from the directory of the error mentioned and change to class DbCollection(Collections.abc.Mapping) and then you will get the next error, do the same thing to make the change until the error module collection is resolve. 

Additional Information

This library is under MIT license and no developer and maintainer will commit on when to update the package and need to expect there is no fixed release for this 0.3.2 version library.