joba-1 / Tasmoticz

Domoticz MQTT autodiscovery plugin for Tasmota devices
MIT License
24 stars 18 forks source link

Error: Tazmoticz: AttributeError: type object 'Collection' has no attribute 'Mapping' with Python 3.10.4 #30

Closed CyrilB1531 closed 1 year ago

CyrilB1531 commented 1 year ago

Is it possible to change tasmota.py file to use collections.abc.Mapping instead of collections.Mapping?

joba-1 commented 1 year ago

I don't think so. It is a type used by the domoticz api, not my choice.

CyrilB1531 commented 1 year ago

Since, I've made this changes in the plugin error disapears and Tazmoticz detects all my temperature sensors from now. And I can push my changes if you want

joba-1 commented 1 year ago

cool, so domoticz changed its api. Then no problem, PR or code example are very welcome. I just need to find out how to make it backwards compatible.

CyrilB1531 commented 1 year ago

I've just add backward compatibilty on the PR. Please let me know if the fix is good for you

joba-1 commented 1 year ago

just tested and merged - works fine with my dated domoticz Version: 2020.2 (build 12173) and Python 3.6.15.

Thanks!