chrieke / prettymapp

🖼️ Create beautiful maps from OpenStreetMap data in a streamlit webapp
MIT License
2.37k stars 357 forks source link

can't open the streamlit example #57

Closed angelodai1 closed 1 month ago

chrieke commented 2 months ago

Thanks! Restarted, available again in a few minutes. Is a frequent problem due to the many visitors, must be sometimes someone is hitting a config that multiple times brings it down so after a while streamlit shuts it down for good I think.

This time caught this error in the logs multiple times, will see what can be done at some point:

Thanks for the report!

Error
``` ────────────────────── Traceback (most recent call last) ─────────────────────── /home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptru nner/script_runner.py:584 in _run_script /mount/src/prettymapp/streamlit-prettymapp/app.py:171 in 168 │ except GeoCodingError as e: 169 │ │ st.error(f"ERROR: {str(e)}") 170 │ │ st.stop() ❱ 171 │ df = st_get_osm_geometries(aoi=aoi) 172 │ config = { 173 │ │ "aoi_bounds": aoi.bounds, 174 │ │ "draw_settings": draw_settings, /home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/caching/ cache_utils.py:168 in wrapper 165 │ 166 │ @functools.wraps(info.func) 167 │ def wrapper(*args, **kwargs): ❱ 168 │ │ return cached_func(*args, **kwargs) 169 │ 170 │ # Give our wrapper its `clear` function. 171 │ # (This results in a spurious mypy error that we suppress.) /home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/caching/ cache_utils.py:199 in __call__ 196 │ │ │ with spinner(message, _cache=True): 197 │ │ │ │ return self._get_or_create_cached_value(args, kwargs) 198 │ │ else: ❱ 199 │ │ │ return self._get_or_create_cached_value(args, kwargs) 200 │ 201 │ def _get_or_create_cached_value( 202 │ │ self, func_args: tuple[Any, ...], func_kwargs: dict[str, Any] /home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/caching/ cache_utils.py:224 in _get_or_create_cached_value 221 │ │ │ return self._handle_cache_hit(cached_result) 222 │ │ except CacheKeyNotFoundError: 223 │ │ │ pass ❱ 224 │ │ return self._handle_cache_miss(cache, value_key, func_args, fu 225 │ 226 │ def _handle_cache_hit(self, result: CachedResult) -> Any: 227 │ │ """Handle a cache hit: replay the result's cached messages, an /home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/caching/ cache_utils.py:280 in _handle_cache_miss 277 │ │ │ with self._info.cached_message_replay_ctx.calling_cached_f 278 │ │ │ │ self._info.func, self._info.allow_widgets 279 │ │ │ ): ❱ 280 │ │ │ │ computed_value = self._info.func(*func_args, **func_kw 281 │ │ │ 282 │ │ │ # We've computed our value, and now we need to write it ba 283 │ │ │ # along with any "replay messages" that were generated dur /mount/src/prettymapp/streamlit-prettymapp/utils.py:24 in st_get_osm_geometries 21 ) 22 def st_get_osm_geometries(aoi): 23 │ """Wrapper to enable streamlit caching for package function""" ❱ 24 │ df = get_osm_geometries(aoi=aoi) 25 │ return df 26 27 /home/adminuser/venv/lib/python3.11/site-packages/prettymapp/osm.py:71 in get_osm_geometries 68 │ │ aoi: Polygon geometry query boundary. 69 │ """ 70 │ tags = get_osm_tags() ❱ 71 │ df = features_from_polygon(polygon=aoi, tags=tags) 72 │ df = cleanup_osm_df(df, aoi) 73 │ return df 74 /home/adminuser/venv/lib/python3.11/site-packages/osmnx/features.py:349 in features_from_polygon 346 │ response_jsons = _overpass._download_overpass_features(polygon, t 347 │ 348 │ # create GeoDataFrame from the downloaded data ❱ 349 │ return _create_gdf(response_jsons, polygon, tags) 350 351 352 def features_from_xml(filepath, polygon=None, tags=None, encoding="ut /home/adminuser/venv/lib/python3.11/site-packages/osmnx/features.py:489 in _create_gdf 486 │ # ensure we got some node/way data back from the server request(s 487 │ if len(geometries) == 0: # pragma: no cover 488 │ │ msg = "No data elements in server response. Check log and que ❱ 489 │ │ raise InsufficientResponseError(msg) 490 │ 491 │ # remove untagged elements from the final dict of geometries 492 │ utils.log(f"{len(geometries)} geometries created in the dict") ──────────────────────────────────────────────────────────────────────────────── InsufficientResponseError: No data elements in server response. Check log and query location/tags. ```