{"record":{"id":"38f7c8393a266fe9","repo":"github/spec-kit","slug":"catalog-from-entry-url-is-not-valid-utf-8-exc","errorCode":null,"errorMessage":"Catalog from {entry.url} is not valid UTF-8: {exc}","messagePattern":"Catalog from (.+?) is not valid UTF-8: (.+?)","errorType":"console","errorClass":"IntegrationCatalogError","httpStatus":null,"severity":"error","filePath":"src/specify_cli/integrations/catalog.py","lineNumber":246,"sourceCode":"                        indent=2,\n                    ),\n                    encoding=\"utf-8\",\n                )\n            except OSError:\n                pass  # Cache is best-effort; proceed with fetched data\n            return catalog_data\n\n        except urllib.error.URLError as exc:\n            raise IntegrationCatalogError(\n                f\"Failed to fetch catalog from {entry.url}: {exc}\"\n            )\n        except UnicodeDecodeError as exc:\n            # A non-UTF-8 response body fails at .decode() before json.loads()\n            # ever runs, so JSONDecodeError below does not cover it (the two are\n            # sibling ValueError subclasses, not parent/child). Without this the\n            # raw UnicodeDecodeError escapes _get_merged_integrations()'s\n            # \"warn and skip this catalog\" handler and kills the whole command.\n            raise IntegrationCatalogError(\n                f\"Catalog from {entry.url} is not valid UTF-8: {exc}\"\n            )\n        except json.JSONDecodeError as exc:\n            raise IntegrationCatalogError(\n                f\"Invalid JSON in catalog from {entry.url}: {exc}\"\n            )\n\n    def _get_merged_integrations(\n        self, force_refresh: bool = False\n    ) -> List[Dict[str, Any]]:\n        \"\"\"Fetch and merge integrations from all active catalogs.\n\n        Catalogs are processed in the order returned by\n        :meth:`get_active_catalogs`.  On conflicts, the first catalog in that\n        order wins (lower numeric priority = higher precedence).  Each dict is\n        annotated with ``_catalog_name`` and ``_install_allowed``.\n        \"\"\"\n        import sys","sourceCodeStart":228,"sourceCodeEnd":264,"githubUrl":"https://github.com/github/spec-kit/blob/bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c/src/specify_cli/integrations/catalog.py#L228-L264","documentation":"Error \"Catalog from {entry.url} is not valid UTF-8: {exc}\" thrown in github/spec-kit.","triggerScenarios":"Thrown at src/specify_cli/integrations/catalog.py:246 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-save the remote catalog as UTF-8 JSON, or point the catalog entry at a valid UTF-8 catalog."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c","analyzedAt":"2026-08-14T19:43:37.150Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}