InvalidByteSequenceError
Opened this issue · 2 comments
Encoding::InvalidByteSequenceError at /queues/do-it/running
"\xC3" on US-ASCII
file: common.rb location: encode line: 148
Just ran into this , i'm storing some html in those jobs, which the json parser doesn't seem to like ..
I was able to work around this in:
https://github.com/seomoz/qless/tree/evans_encoding_error_workaround
762f7f6
It was at least good enough for me to run a script to reenqueue my failed jobs.
Update: for me this was caused by Ruby's default external encoding being "US-ASCII" instead "UTF-8", which was in turn caused by Ruby running in a docker container. The data jobs were valid UTF-8 (perhaps the strings had UTF-8 encoding when putting the job because the string originally came from a UTF-8 web page? not sure). The solution for me was to add the following to my Dockerfile:
ENV LANG C.UTF-8
ENV LANGUAGE en_US:C
ENV LC_ALL C.UTF-8
Then Ruby inside the container gives Encoding.default_external
as UTF-8.