MoonRide303 / Fooocus-MRE

Focus on prompting and generating
GNU General Public License v3.0
946 stars 56 forks source link

load_settings, e: 'utf-8' codec can't decode byte 0xd7 in position 1206: invalid continuation byte #169

Open barzilli opened 1 year ago

barzilli commented 1 year ago

Hi,

I'm running in a generic Linux Debian 12 container and get the following error whenever I launch entry_with_update.py: load_settings, e: 'utf-8' codec can't decode byte 0xd7 in position 1206: invalid continuation byte

This error occurs because the settings-example.json and resolutions-example.json files contain extended ascii characters. The .json files work correctly when I make them into generic text files, with no extended characters. Specifically, the "x" character that separates the resolution height and width definitions contain an extended "x" ascii character.

If you look closely at the following example taken from the settings-example.json file, you will notice that "resolution": "1152×896 (9:7)", is not the same as "resolution": "1152x896 (9:7)",

Please replace the special extended ascii "×" in the json files with generic text "x".

Regards, -Rick

MoonRide303 commented 1 year ago

@barzilli Hi there. I checked it on my own PC (just copied those example files, and removed '-example' from the names) and it seems to be working fine - no errors at all. I am using Windows, but Python should handle text files encoding same way across different OSes. Questions:

  1. Did you copy those files from latest release, or maybe from some older MRE version?
  2. Did you only copy those files, or also used some editors to introduce some changes? It might be your text editor that is causing the troubles (if it uses different encoding than UTF-8).