brendan-w / python-OBD

OBD-II serial module for reading engine data

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incompatible with python 3.10 due to collections.MutableMapping deprecation

j-schmied opened this issue · comments

Behaviour is reproducable on Windows 10/11, MacOS 11.6, Kali Linux 2021.3 and was already announced when importing MutableMapping on Python<=3.9

ImportError: cannot import name 'MutableMapping' from 'collections' (C:\Users<user>\AppData\Local\Programs\Python\Python310\lib\collections_init_.py)

Solution: using collections.abc.MutableMapping should fix the issue (source: https://docs.python.org/3/library/collections.abc.html)

This seems to be an issue with pint module. It's already fixed in their GitHub repo but there seems to be no official release with the fix yet. I fixed the two files by correcting the import on my own meanwhile.

I got this error, was able to get library working by uninstalling all instances of one via pip uninstall obd and then re installing via pip install +git https://GitHub.com/brendan-w/python-obd@master