mac-zhou / midea-msmart

This is a library to allow communicating to a Midea AC via the Local area network.
MIT License
147 stars 39 forks source link

ModuleNotFoundError: No module named 'Crypto.Util.Padding' #96

Open JoeCotty opened 2 years ago

JoeCotty commented 2 years ago

Hi,

i try to use your module with "fhem" home automation but i get this mentioned error. Any ideas what i do wrong ? I use fhem on a raspberry B with buster an i normally work with windows. Python3 ist installed :

Package Version


asn1crypto 0.24.0 certifi 2018.8.24 chardet 3.0.4 click 8.1.3 crypto 1.4.1 cryptography 2.6.1 entrypoints 0.3 idna 2.6 ifaddr 0.2.0 importlib-metadata 4.12.0 keyring 17.1.1 keyrings.alt 3.1.1 msmart 0.2.3 Naked 0.1.31 pip 18.1 pycrypto 2.6.1 pycryptodome 3.15.0 PyGObject 3.30.4 python-apt 1.8.4.3 pyxdg 0.25 PyYAML 6.0 requests 2.21.0 SecretStorage 2.3.1 setuptools 40.8.0 shellescape 3.8.1 six 1.12.0 ssh-import-id 5.7 typing-extensions 4.3.0 urllib3 1.24.1 wheel 0.32.3 zipp 3.8.1

Here a error trace from my system with the missing module error ...

Traceback (most recent call last): File "/opt/midea-msmart/setAC.py", line 7, in from msmart.device import air_conditioning as ac File "/opt/midea-msmart/msmart/device/init.py", line 4, in from .AC.appliance import air_conditioning File "/opt/midea-msmart/msmart/device/AC/appliance.py", line 7, in from msmart.device.base import device File "/opt/midea-msmart/msmart/device/base.py", line 3, in from msmart.lan import lan File "/opt/midea-msmart/msmart/lan.py", line 6, in from msmart.security import security File "/opt/midea-msmart/msmart/security.py", line 5, in from Crypto.Util.Padding import pad, unpad ModuleNotFoundError: No module named 'Crypto.Util.Padding'

Any help appreciated

Best regards Joe

mill1000 commented 1 year ago

Try removing pycrypto. I think it conflicts with pycryptodome.