pklaus / brother_ql_web

A Python-based web service to print labels on Brother QL label printers. Based on brother_ql: https://github.com/pklaus/brother_ql
GNU General Public License v3.0
254 stars 124 forks source link

added explicit encoding to open call #20

Closed ReinierH closed 4 years ago

ReinierH commented 5 years ago

Ran into an error while running it:

UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 677: ordinal not in range(128)

It tried to decode the json file in ascii. Adding an explicit encoding type to the open call fixed it.

pklaus commented 4 years ago

Dear @ReinierH, thanks for you pull request. I cherry-picked 95ccb6d (covering the topic of this PR - specifying the encoding for opening the json file) but left the (unintentional?) be6ed65 (move to CUPS backend) untouched. It's nice that printing with CUPS as backend is possible that easily, probably this could be a startup option selecting between the modes? I somehow like this idea but I currently have no time implementing it.

Thanks again.