gendesign/backend/app
lekss361 ce5e29f92e fix(nspd-geo): rosreestr2coord v5 compat — delay arg, tmp cache, dumps default
Three incremental bugs surfaced while wiring rosreestr2coord v5 into our
worker. All in backend/app/services/scrapers/nspd_lite.py.

1. `Area.__init__()` removed `delay` kwarg in v5 (was throttling). Drop
   it from our call. Rate limit now happens in worker via
   time.sleep(rate_ms/1000) after each fetch.

2. `Area(..., use_cache=True)` default writes media cache to ./tmp/
   relative to CWD. In our docker image CWD=/app (owned by root), worker
   runs as non-root → PermissionError on every target. Fix:
   use_cache=False, media_path="/tmp/rosreestr2coord".

3. `Area.to_geojson_poly(dumps=True)` default returns JSON-serialized
   STRING, not dict (changed in v5). Worker's _persist_target expects
   dict with .get("properties") → AttributeError. Fix: dumps=False.

Vault entries:
- fixes/Bug_Rosreestr2coord_Delay_Arg_v5_Fixed.md
- fixes/Bug_Nspd_Geo_Tmp_Permission_Fixed.md
- fixes/Bug_Nspd_Geo_Str_Object_No_Get_Fixed.md
2026-05-11 14:43:44 +03:00
..
api refactor(nspd-geo): unify on rosreestr2coord v5, drop legacy column 2026-05-11 14:13:33 +03:00
core refactor(nspd): remove Playwright-based scraper, rosreestr2coord = default 2026-05-11 09:21:12 +03:00
models init 2026-04-25 13:45:19 +03:00
schemas fix recommend page 2026-04-29 08:16:22 +03:00
services fix(nspd-geo): rosreestr2coord v5 compat — delay arg, tmp cache, dumps default 2026-05-11 14:43:44 +03:00
workers refactor(nspd-geo): unify on rosreestr2coord v5, drop legacy column 2026-05-11 14:13:33 +03:00
__init__.py init 2026-04-25 13:45:19 +03:00
main.py sprint1: nspd scraper industrialization, per-bucket elasticity, cadastre cross-check, sentry releases 2026-04-30 21:51:19 +03:00