yuvadm / greenpass

Signature verification for the Green Pass (התו הירוק)
GNU General Public License v3.0
38 stars 12 forks source link

ValueError: not enough values to unpack #7

Open kapitaali opened 2 years ago

kapitaali commented 2 years ago

Hi,

trying out the Israeli verification script. As data I am using this QR code, saved as a PNG: https://github.com/MohGovIL/Ramzor/blob/main/Verification/Samples/CovidCertificate_01.pdf

I'm getting the following error:

/greenpass$ pipenv run verify -i israel.png 
Traceback (most recent call last):
  File "/.../.../greenpass/verify.py", line 164, in <module>
    verify()
  File "/.../.local/share/virtualenvs/greenpass-b5VDXc3P/lib/python3.9/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/.../.local/share/virtualenvs/greenpass-b5VDXc3P/lib/python3.9/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/.../.local/share/virtualenvs/greenpass-b5VDXc3P/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/.../.local/share/virtualenvs/greenpass-b5VDXc3P/lib/python3.9/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/.../.../greenpass/verify.py", line 151, in verify
    verifier = GreenPassVerifier.from_qr(image_path)
  File "/.../.../greenpass/verify.py", line 38, in from_qr
    return cls(pyzbar.decode(Image.open(path))[0].data)
  File "/.../.../greenpass/verify.py", line 20, in __init__
    sig, self.payload = data_bytes.split(b"#", maxsplit=1)
ValueError: not enough values to unpack (expected 2, got 1)
yuvadm commented 2 years ago

Thanks for this bug report, I pushed some updates recently, might have caused some regressions