littlejo / huawei-lte-examples

Examples of codes using python huawei-lte-api api
GNU General Public License v3.0
50 stars 18 forks source link

huawei-lte-band login failures #10

Open BthereDthat opened 1 year ago

BthereDthat commented 1 year ago

https://github.com/littlejo/huawei-lte-examples/blob/257dcd676eec21afcf0c11d2ab924a86154b7c31/huawei-lte-band/main.py#L187 LoginApp().run() https://github.com/littlejo/huawei-lte-examples/blob/257dcd676eec21afcf0c11d2ab924a86154b7c31/huawei-lte-band/main.py#L49 calls Config.set(default_section, 'password', crypto.encode_password(self.password)) which ends with: File "/home/xxx/.local/lib/python3.9/site-packages/Crypto/Util/_raw_api.py", line 242, in c_uint8_ptr raise TypeError("Object type %s cannot be passed to C code" % type(data)) TypeError: Object type <class 'str'> cannot be passed to C code

I'm not sure if you are using PyCryptodome instead of (deprecated?) PyCrypto...

BthereDthat commented 1 year ago

Resolved in pull request #12