SignalFlagZ / sd-webui-civbrowser

Extension to search and download Civitai models in multiple tabs. Save model information. Send sample infotext to txt2img.
GNU Affero General Public License v3.0
62 stars 11 forks source link

CivBrowser gives an error on startup and no tabs are displayed (JSONDecodeError) #66

Open SignalFlagZ opened 4 days ago

SignalFlagZ commented 4 days ago

Describe the bug When launching the Web UI, a CivBrowser error is displayed in the console. The Web UI works but the CivBrowser tab doesn't appear.

Screenshots

      File "D:\StableDiffusion\Data\Packages\Stable Diffusion WebUI Forge\extensions\sd-webui-civbrowser\scripts\civsfz_api.py", line 226, in getOptions
        data = self.requestApiOptions(url, query)
      File "D:\StableDiffusion\Data\Packages\Stable Diffusion WebUI Forge\extensions\sd-webui-civbrowser\scripts\civsfz_api.py", line 213, in requestApiOptions
        data = json.loads(response.text)
      File "json\__init__.py", line 346, in loads
      File "json\decoder.py", line 337, in decode
      File "json\decoder.py", line 355, in raw_decode
    json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Environment (please complete the following information):

SignalFlagZ commented 4 days ago

If the CivitAI server is down or undergoing maintenance, the program will terminate with an error. This time, the cause is that the CivitAI server is "503 Service Temporarily Unavailable". I couldn't debug it because I didn't know the server's response pattern. The code originally expected a response error, so I plan to add logic to distinguish it from expected errors.