BlafKing / sd-civitai-browser-plus

Extension to access CivitAI via WebUI: download, delete, scan for updates, list installed models, assign tags, and boost downloads with multi-threading.
GNU Affero General Public License v3.0
289 stars 44 forks source link

[Bug]: KeyError: 'nsfw' #248

Closed irldoggo closed 4 months ago

irldoggo commented 4 months ago

Describe the bug.

Another breaking API update it seems.

Steps to reproduce the problem.

  1. Press search
  2. Error.

Expected behavior

  1. Press search.
  2. No error.

System info

Console logs

File "/home/***/sd/stable-diffusion-webui-forge/extensions/sd-civitai-browser-plus/scripts/civitai_api.py", line 224, in model_list_html
    if item["modelVersions"][0]["images"][0]['nsfw'] not in ["None", "Soft"]:
KeyError: 'nsfw'

Additional information

No response

spooknik commented 4 months ago

Also noticed this happening. I assume it's due to the changes civitai made to their NSFW filters.

Hobo-Siah commented 4 months ago

Also noticed this happening. I assume it's due to the changes civitai made to their NSFW filters. yep

BlafKing commented 4 months ago

Thanks for reporting, I'll post a fix for this shortly after figuring out what the new API information corelates to exactly 👍🏻

Terroosh commented 4 months ago

I hope Civitai can settle on something stable soon. These constant api changes must be annoying to deal with.

BlafKing commented 4 months ago

I have published a hotfix for this issue, it should now be fixed! Unfortunately it looks like NSFW filtering is currently a bit broken after the API update from CivitAI.

I have created a bug report about the issue on the CivitAI github, so let's hope it gets fixed soon. I have also created a bug report on this repo about the issues here

Thanks again for reporting! I'll mark this as resolved 👍🏻