BU-hammerTeam / PyHammer

A Python Spectral Typing Suite
MIT License
53 stars 14 forks source link

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9a in position 6209: invalid start byte #41

Open AlexSokokoliuk opened 3 years ago

AlexSokokoliuk commented 3 years ago

What should I do with that?

Traceback (most recent call last):
  File "pyhammer.py", line 864, in goToMain
    main(self.options)
  File "pyhammer.py", line 68, in main
    for i, line in enumerate(infile_init):
  File "C:\Users\alexs\Anaconda3\lib\codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9a in position 6209: invalid start byte
zephyr5050 commented 3 years ago

That looks like the input file you tried to load could not be read. Was your file corrupted in some way? Are you sure that it is a plain text file? pyhammer.py is reading the file and decoding it with a standard utf-8 decoder, but finding a byte that is not specified in utf-8.

If possible, can you post the input file you were using and describe the specific steps you followed to generate this exception? Either by describing your GUI interactions/inputs if you used the GUI or else your specific commands if you used the command line.

sai-33 commented 3 years ago

Screenshot (256)

UBUNTU Python 3.9

zephyr5050 commented 3 years ago

Neither python pyhammer.py run nor python pyhammer.py install are valid commands to be used when running PyHammer. Use either python pyhammer.py -h or view the Starting PyHammer for information on valid inputs when running PyHammer.

Admittedly, this error case should be caught and handled rather than having it error as it does.

zephyr5050 commented 3 years ago

See #43 for another instance of this error being logged.

sai-33 commented 3 years ago

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9a in position 6209: invalid start byte

How to solve this issue

zephyr5050 commented 3 years ago

See my previous comment. If you still experience this issue after following the instructions therein, you can post additional information that would help address this issue.

sai-33 commented 3 years ago

Yes, I am experiencing the same issue. Screenshot (258)

zephyr5050 commented 3 years ago

It looks like you pulled up the GUI in your last attempt. Can you provide information everything you entered in each GUI as well as attach any input files you may have used which resulted in this error? Without seeing exactly how you're using this and what inputs you're providing, it will not be possible to troubleshoot.

This error looks to be an issue with the input file you've provided. Is this input file a standard text file?