This error occurred when I executed the script:
Traceback (most recent call last): File "test1.py", line 7, in <module> api.login(email=mail, password=passwd) File "/home/caiyiyong/googleplay-api/gpapi/googleplay.py", line 214, in login encryptedPass = self.encryptPassword(email, password).decode('utf-8') File "/home/caiyiyong/googleplay-api/gpapi/googleplay.py", line 103, in encryptPassword modulus = utils.toBigInt(binaryKey[4:][0:i]) File "/home/caiyiyong/googleplay-api/gpapi/utils.py", line 21, in toBigInt decoded = struct.unpack("B", bytes([value]))[0] struct.error: unpack requires a string argument of length 1
When I change 'decoded = struct.unpack("B", bytes([value]))[0]' to 'decoded = struct.unpack("B", bytes([value])[0])[0]' ,The mistake is gone。
This error occurred when I executed the script:
Traceback (most recent call last): File "test1.py", line 7, in <module> api.login(email=mail, password=passwd) File "/home/caiyiyong/googleplay-api/gpapi/googleplay.py", line 214, in login encryptedPass = self.encryptPassword(email, password).decode('utf-8') File "/home/caiyiyong/googleplay-api/gpapi/googleplay.py", line 103, in encryptPassword modulus = utils.toBigInt(binaryKey[4:][0:i]) File "/home/caiyiyong/googleplay-api/gpapi/utils.py", line 21, in toBigInt decoded = struct.unpack("B", bytes([value]))[0] struct.error: unpack requires a string argument of length 1
When I change 'decoded = struct.unpack("B", bytes([value]))[0]' to 'decoded = struct.unpack("B", bytes([value])[0])[0]' ,The mistake is gone。