gibberish-detector icon indicating copy to clipboard operation
gibberish-detector copied to clipboard

error: There was an issue parsing your model. Try re-creating it.

Open carloslihu opened this issue 2 years ago • 3 comments

Hello,

I have a problem executing the quickstart. I am using Python 3.9.12

I have generated the model with the command line: gibberish-detector train examples/big.txt > big.model

Then, when I execute the detection with: gibberish-detector detect --model big.model --string "ertrjiloifdfyyoiu"

I have the following error appear:

error: There was an issue parsing your model. Try re-creating it.

I have uploaded the trained model big.model (with .txt extension so that it can be uploaded here)

Do you know what might have gone wrong? Thank you very much

big.model.txt .

carloslihu avatar May 19 '22 10:05 carloslihu

Getting the same error...tried training the model multiple but still the message "error: There was an issue parsing your model. Try re-creating it." persists.

riddhikt avatar Jul 28 '22 06:07 riddhikt

Hmm. I'm unable to reproduce this with python 3.9.13 🤔 When using your provided model, it gives me a UnicodeDecodeError:

$ gibberish-detector detect --model big.model.txt --string "ertrjiloifdfyyoiu"
Traceback (most recent call last):
  File "~/Documents/github/gibberish-detector/venv/bin/gibberish-detector", line 33, in <module>
    sys.exit(load_entry_point('gibberish-detector', 'console_scripts', 'gibberish-detector')())
  File "~/Documents/github/gibberish-detector/gibberish_detector/main.py", line 15, in main
    return {
  File "~/Documents/github/gibberish-detector/gibberish_detector/main.py", line 40, in _handle_detect_action
    Detector = detector.create_from_model(args.model, args.limit)
  File "~/Documents/github/gibberish-detector/gibberish_detector/detector.py", line 12, in create_from_model
    model = serializer.deserialize(f.read())
  File "~/.pyenv/versions/3.9.13/lib/python3.9/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte

Let me dig deeper into your generated model, and hopefully see what's going on. What OS are you using?

domanchi avatar Feb 25 '23 02:02 domanchi

Hello, At the time of the problem I was using Windows 10. But now I am using Windows 11

carloslihu avatar Feb 28 '23 11:02 carloslihu