Fix simulator QR Codes#827
Conversation
851fa6f to
6b38009
Compare
| return parser.result(), parser.format | ||
| return None, None | ||
|
|
| Pillow = { version = "^11.3.0", optional = true } | ||
| pygame = { version = "^2.6.1", optional = true } | ||
| pyzbar = { version = "^0.1.9", optional = true } | ||
| pyzbar = { git = "https://github.com/tadeubas/pyzbar", tag = "v0.1.10", optional = true } |
There was a problem hiding this comment.
Why does it need a custom pyzbar module?
There was a problem hiding this comment.
I stumbled on the issue with the official pyzbar repo’s when reading a QRCode using SeedQReader. It had some issues with accents! Switching to the SeedSigner pyzbar fork fixed it right away. That’s when I realized the Krux simulator was also using the same buggy official pyzbar version.
I also noticed the simulator’s QR encoder was using pyqrcode, which hasn’t been updated since 2016 (yikes 😅). It turns out that library was causing encoding issues with accents too! I swapped it out for qrcode (yes, same name as MaixPy) and everything worked flawlessly.
We could use the SeedSigner release, but it pins the same buggy pyzbar version. That means developers would need to purge the existing installation to ensure the updated version is actually used. To address this, I created a bumped version in my repository.
There was a problem hiding this comment.
I think this make sense. IMO we could use your fork as workaround just for development branch, temporarily; a merge on your pyzbar as PR on upstream repo would be a great contribution to community and when merged (🙏🏽), we could back to original setup on develop, with both baked rabbits.
|
Please try to use the official Please try to fix CI errors too. |
Lol, the PR exists on "official" |
|
Yup, isnt a well maintained repo. Even the last commit is from 5 years ago. Isn't possible to formatting while resolve this major one? |
What is this PR for?
The Simulator had issues when encoding data into QR codes and when reading QR codes via pyzbar. This PR fixes both problems and restores reliable QR round-trips 😄.
Removed the unnecessary
qr_str_to_bytesthat was trying to solve those issues.How to test:
Changes made to:
Did you build the code and tested on device?
What is the purpose of this pull request?