greppo: file not found error

I am able to install greppo package. But getting this error:


# greppo serve app.py --host 172.31.38.540
INFO:     Started server process [10836]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://172.31.38.540:8080 (Press CTRL+C to quit)
INFO:     18.209.195.135:54298 - "GET / HTTP/1.1" 200 OK
INFO:     18.209.195.135:54298 - "GET /css/app.a14da775.css HTTP/1.1" 200 OK
INFO:     18.209.195.135:54297 - "GET /css/chunk-vendors.db50bcea.css HTTP/1.1" 200 OK
INFO:     18.209.195.135:54301 - "GET /js/chunk-vendors.526a29f2.js HTTP/1.1" 200 OK
INFO:     18.209.195.135:54300 - "GET /js/app.7529265e.js HTTP/1.1" 200 OK
ERROR:fiona._env:geospatial_data.geojson: No such file or directory
INFO:     18.209.195.135:54301 - "GET /api HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "fiona/_shim.pyx", line 83, in fiona._shim.gdal_open_vector
  File "fiona/_err.pyx", line 291, in fiona._err.exc_wrap_pointer
fiona._err.CPLE_OpenFailedError: geospatial_data.geojson: No such file or directory

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (6 by maintainers)

Most upvoted comments

I’ll take a look into this. In the meanwhile, can you use the vector_layer instead?

import geopandas as gpd
from greppo import app

data_gdf = gpd.read_file("./data/communes.geojson")

app.vector_layer(
    data = data_gdf,
    name = "Communes",
    description = "Communes in Normandy, France",
    style = {"fillColor": "#F87979"},
)

They are both the same. But overlay_layer use vector layer internally.

I had the same problem yesterday. I just try the vector layer module and as well the overlay layer and all are working perfectly !

image

image

… and for the record, Greppo is amazing ! Amazing work Adithya Krishnan 😎

I used all the code mentioned on this page…

https://docs.greppo.io/mental-model.html

This code line did not work:

app.overlay_layer(
    data_gdf_1,
    name="Communes",
    description="Communes in Normandy, France",
    style={"fillColor": "#F87979"},
    visible=True,
)

In fact all the samples in quickstart guide having overlay_layer() method has this problem. May be I have not installed the module correctly.

By the way greppo seems to be awesome. I have seen other high level modules, but it looks like highest level module!

Yes. Setting data=data_gdf explicitly solved the problem. Thanks @srizer Can someone fix the documentation and examples?

For what it’s worth, I also had this issue and it seems to have been resolved by explicitly setting data=data_gdf as opposed to just having data_gdf.

I managed to solve the credentials problem. But when I used this code… https://docs.greppo.io/mental-model.html

got this error:

TypeError: overlay_layer() takes 1 positional argument but 2 were given