{"record":{"id":"764578eecc93d08b","repo":"HelloZeroNet/ZeroNet","slug":"unable-to-load-s-s","errorCode":null,"errorMessage":"Unable to load %s: %s","messagePattern":"Unable to load (.+?): (.+?)","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/Site/SiteManager.py","lineNumber":45,"sourceCode":"        gevent.spawn(self.saveTimer)\n        atexit.register(lambda: self.save(recalculate_size=True))\n\n    # Load all sites from data/sites.json\n    @util.Noparallel()\n    def load(self, cleanup=True, startup=False):\n        from Debug import Debug\n        self.log.info(\"Loading sites... (cleanup: %s, startup: %s)\" % (cleanup, startup))\n        self.loaded = False\n        from .Site import Site\n        address_found = []\n        added = 0\n        load_s = time.time()\n        # Load new adresses\n        try:\n            json_path = \"%s/sites.json\" % config.data_dir\n            data = json.load(open(json_path))\n        except Exception as err:\n            raise Exception(\"Unable to load %s: %s\" % (json_path, err))\n\n        sites_need = []\n\n        for address, settings in data.items():\n            if address not in self.sites:\n                if os.path.isfile(\"%s/%s/content.json\" % (config.data_dir, address)):\n                    # Root content.json exists, try load site\n                    s = time.time()\n                    try:\n                        site = Site(address, settings=settings)\n                        site.content_manager.contents.get(\"content.json\")\n                    except Exception as err:\n                        self.log.debug(\"Error loading site %s: %s\" % (address, err))\n                        continue\n                    self.sites[address] = site\n                    self.log.debug(\"Loaded site %s in %.3fs\" % (address, time.time() - s))\n                    added += 1\n                elif startup:","sourceCodeStart":27,"sourceCodeEnd":63,"githubUrl":"https://github.com/HelloZeroNet/ZeroNet/blob/454c0b2e7e000fda7000cba49027541fbf327b96/src/Site/SiteManager.py#L27-L63","documentation":"Wrap-up error in SiteManager.load: while reading data/sites.json and instantiating sites, any per-site failure (corrupt entry, missing data directory, Site constructor exception) is logged and re-raised in this 'Unable to load %s: %s' form. The input at fault is the malformed or broken sites.json entry for the named address.","triggerScenarios":"Thrown at src/Site/SiteManager.py:45 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect data/sites.json and remove/fix the corrupt site entry named in the message","Check the site's data directory for missing or damaged files and rebuild it","Recover from the backup sites.json (sites.json.bak) if the file is corrupted"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"454c0b2e7e000fda7000cba49027541fbf327b96","analyzedAt":"2026-09-02T19:46:57.278Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T02:17:09.455Z"}