devartis / passbook

Python library to create Apple Passbook (.pkpass) files
http://www.devartis.com/
MIT License
276 stars 112 forks source link

TypeError: Unicode-objects must be encoded before hashing #48

Closed micheleberardi closed 5 years ago

micheleberardi commented 5 years ago

Hi first at all thanks for the script

i tried to run my script on python 3 but I got the following error

someone can help me?

python3 generate.py Traceback (most recent call last): File "generate.py", line 25, in passfile.create('certificate.pem', 'key.pem', 'wwdr.pem', password , 'test.pkpass') File "/var/www/html/source/pass.bucksense.com/passbook-master/passbook/models.py", line 319, in create manifest = self._createManifest(pass_json) File "/var/www/html/source/pass.bucksense.com/passbook-master/passbook/models.py", line 332, in _createManifest self._hashes['pass.json'] = hashlib.sha1(pass_json).hexdigest() TypeError: Unicode-objects must be encoded before hashing

micheleberardi commented 5 years ago

sorry m mistake i fixed