Page 1 of 1

Critical Error - Need urgent assistance

Posted: Fri Oct 22, 2021 10:48 am
by thejokersnatch

i7-4770K CPU
16 GB Ram
Nvidia Quadro K4000

I had been using Faceswap since two months now and everything was working well (though it failed to use GPU, it always used CPU which is beyond my understanding). I have extracted, trained and converted multiple videos for entertainment on the same system. However two days ago, as I left my CPU on training while I went to the office, something happened which is beyond my understanding since I'm no developer. I'm unable to open my projects, extract, train or convert any newer ones either.

P.S. I updated my software (using Help Menu > Update Faceswap) following the error thinking it might help but to no avail.

Following is the crash log I'm getting when I open my projects:

Code: Select all

Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Program Files\faceswap\lib\serializer.py", line 166, in unmarshal
    retval = self._unmarshal(serialized_data)
  File "C:\Program Files\faceswap\lib\serializer.py", line 212, in _unmarshal
    return json.loads(data.decode("utf-8"))
  File "C:\Users\Cheat\MiniConda3\envs\faceswap\lib\json\__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "C:\Users\Cheat\MiniConda3\envs\faceswap\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Users\Cheat\MiniConda3\envs\faceswap\lib\json\decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\Cheat\MiniConda3\envs\faceswap\lib\tkinter\__init__.py", line 1892, in __call__
    return self.func(*args)
  File "C:\Program Files\faceswap\lib\gui\display_analysis.py", line 148, in _populate_from_folder
    self._load_session(full_path=os.path.join(folder, state_file))
  File "C:\Program Files\faceswap\lib\gui\display_analysis.py", line 253, in _load_session
    Session.initialize_session(model_dir, model_name, is_training=False)
  File "C:\Program Files\faceswap\lib\gui\analysis\stats.py", line 127, in initialize_session
    self._load_state_file()
  File "C:\Program Files\faceswap\lib\gui\analysis\stats.py", line 92, in _load_state_file
    self._state = serializer.load(state_file)
  File "C:\Program Files\faceswap\lib\serializer.py", line 109, in load
    retval = self.unmarshal(data)
  File "C:\Program Files\faceswap\lib\serializer.py", line 170, in unmarshal
    raise FaceswapError(msg) from err
lib.utils.FaceswapError: Error unserializing data for type <class 'bytes'>: Expecting value: line 1 column 1 (char 0)

Would appreciate the help to bring this to work once again.


Re: Critical Error - Need urgent assistance

Posted: Mon Nov 08, 2021 11:42 am
by torzdf

Your model's state file looks broken (it's the .json file inside your model folder). Ultimately it looks like it is empty for some reason.

Easiest solution would be to restore from backup or rollback to a previous snapshot.