reinderien/mimic

Cannot decode non-ASCII cmdline options

Closed this issue · 6 comments

Traceback (most recent call last):
  File "./mimic", line 287, in <module>
    main()
  File "./mimic", line 277, in main
    explain(unicode(options.char[0], 'utf-8'))
UnicodeDecodeError: 'utf8' codec can't decode byte 0xcf in position 0: unexpected end of data

Could you please post whatever the solution was? I get exactly the same message and have no idea how to fix it.

It's quite curious that you're able to repro the issue. It was fixed in 20946b1

It gets stranger - I checked out the master branch and looked for the lines changed in that commit and I do not have the fix I see in your commit.

Stranger still - after manually changing that line, it still wouldn't work. I have noticed, however, that the error message is not exactly the same:

Traceback (most recent call last):
  File "./mimic", line 307, in <module>
    main()
  File "./mimic", line 295, in main
    listing()
  File "./mimic", line 175, in listing
    out.write(field + c)
  File "/usr/lib/python2.7/codecs.py", line 357, in write
    data, consumed = self.encode(object, self.errors)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2591' in position 0: ordinal not in range(128)

The obvious: did you try git pull?

My best guess, at this point, is that your git situation has gone sour. As @kirbyfan64 just suggested, do a pull, and diff your branch.

I can honestly attest that I am doing this on a squeaky-clean git checkout. I actually checked out the source about 30 minutes ago. Interestingly, looking at https://github.com/reinderien/mimic/blob/master/mimic I also don't see the fix incorporated. Maybe github is having cache issues again?