panzi / verify-ehc

Simple Python script to decode and verify an European Health Certificate QR-code
60 stars 17 forks source link

SyntaxError: invalid syntax #13

Closed olafmarcos closed 3 years ago

olafmarcos commented 3 years ago

I get this error:

Traceback (most recent call last): File "verify_ehc.py", line 30, in from jose import jwt, jws, jwk # type: ignore File "/home/olaf/.local/lib/python3.7/site-packages/jose.py", line 546 print decrypt(deserialize_compact(jwt), {'k':key}, ^

I'm passing the ehc_code as 'HC1:NCFOXN%TSMAHN-HUN8.....' string. Is it correct?

panzi commented 3 years ago

You have the wrong jose library installed. The library called jose is broken (uses Python 2 syntax), you need to remove it and install python-jose instead. In particular install it parametrized as python-jose[cryptography], see requirements.txt.

olafmarcos commented 3 years ago

Thank you very much.

Sorry, not seen the version requirement....

Working like a charm!