Open BthereDthat opened 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...
Resolved in pull request #12
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...