-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ArrowInvalid: cannot mix list and non-list, non-null values #8
Comments
Same for maxar Show error outputFile c:\Users\JackE\anaconda3\envs\JackConda\Lib\site-packages\coincident\search\stac.py:31, in to_geopandas(collection) TypeError: Argument 'struct_array' has incorrect type (expected pyarrow.lib.StructArray, got pyarrow.lib.NullArray) |
would be good to narrow in on a small AOI that reproduces this if possible. I'll have to dig into this a bit, my guess is there might be the occasional weird STAC Item that throughs off the conversion, |
@scottyhq I've been getting this result for searching the cop30 dataset at various spatial and temporal extents. Below is some code to reproduce the results for one of the sites. I don't fully understand the error from from_dicts() we're getting here. Not sure if the below is relevant for stac_geoparquet.arrow.parse_stac_items_to_arrow(collection) Code# random 3dep flight in CO
aoi = gpd.read_file('https://raw.githubusercontent.com/unitedstates/districts/refs/heads/gh-pages/states/CO/shape.geojson')
gf_3dep = coincident.search.search(dataset='3dep',
intersects=aoi,
datetime=['2018', '2019'],
)
site = gf_3dep[gf_3dep.workunit == "CO_Eastern_B1_2018"]
# failed attempt
# TypeError: Argument 'struct_array' has incorrect type (expected pyarrow.lib.StructArray, got pyarrow.lib.NullArray)
gf_cop = coincident.search.search(dataset='cop30',
intersects=site.geometry.envelope,
datetime=['2018-04-30', '2018-07-25'],
)
# another failed attempt
# TypeError: Argument 'struct_array' has incorrect type (expected pyarrow.lib.StructArray, got pyarrow.lib.NullArray)
gf_cop = coincident.search.search(dataset='cop30',
intersects=site.geometry.envelope,
datetime=['2018', '2019'],
) |
TypeError: Argument 'struct_array' has incorrect type (expected pyarrow.lib.StructArray, got pyarrow.lib.NullArray) Is happening when the search results are empty & we're trying to convert an empty list to a dataframe. For the case below no results are returned b/c the cop30 dem 'representatitive' timestamp is gf_cop = coincident.search.search(dataset='cop30',
intersects=site.geometry.envelope,
datetime=['2018-04-30', '2018-07-25'], |
two separate issues with this: 1. should raise a warning if not passing either pd.json_normalize(gf.acquisitionInfo).T
#polarisationList.polLayer HH [HH, HV] [HH, HV] [HH, HV] [HH, HV] |
gf_tdx = coincident.search.search(dataset='tdx')
ArrowInvalid: cannot mix list and non-list, non-null values
Getting this when searching the entire dataset, I think we just need to update STAC collection parsing to ensure consistent datatypes before converting to geopandas
The text was updated successfully, but these errors were encountered: