STAC Job Manager: item_id must be string
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 48/100
Rechercherichtung
Beginne bei der verlinkten Zeile in openeo/extra/job_management/stac_job_db.py und verfolge initialize_from_df über persist bis zum Item-Upload. Vergleiche das Verhalten des Fallback-Index mit der Anforderung der STAC Item an eine String-ID; abgeschlossen ist es, wenn die gewählte Richtlinie explizit ist und der Pfad zur Item-Erstellung keine Integer-ID mehr sendet.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
I faced an issue recently where I got the following error when creating a STAC job database. The collection is created as expected, but there is an error when creating the item if a field named "item_id" is not available in my pandas dataframe.
Expecting HTTP status to be any of [200, 201, 202] but received 500 - Internal Server Error, request method=POST
response body:
{"code":"ValidationError","description":"1 validation error for Item\nid\n Input should be a valid string [type=string_type, input_value=0, input_type=int]\n For further information visit https://errors.pydantic.dev/2.11/v/string_type"}
Expecting HTTP status to be any of [200, 201, 202] but received 500 - Internal Server Error, request method=POST
response body:
{"code":"ValidationError","description":"1 validation error for Item\nid\n Input should be a valid string [type=string_type, input_value=500, input_type=int]\n For further information visit https://errors.pydantic.dev/2.11/v/string_type"}
Traceback (most recent call last):
File "/data/users/Private/pratixa/nifi/cropsar_px_nifi/create_job_database.py", line 151, in <module>
main()
File "/data/users/Private/pratixa/nifi/cropsar_px_nifi/create_job_database.py", line 140, in main
job_db.initialize_from_df(jobs_df, on_exists='error')
File "/home/pratixa/.conda/envs/nifi/lib/python3.12/site-packages/openeo/extra/job_management/stac_job_db.py", line 106, in initialize_from_df
self.persist(df)
File "/home/pratixa/.conda/envs/nifi/lib/python3.12/site-packages/openeo/extra/job_management/stac_job_db.py", line 211, in persist
self._upload_items_bulk(self.collection_id, all_items)
File "/home/pratixa/.conda/envs/nifi/lib/python3.12/site-packages/openeo/extra/job_management/stac_job_db.py", line 247, in _upload_items_bulk
self._ingest_bulk(chunk)
File "/home/pratixa/.conda/envs/nifi/lib/python3.12/site-packages/openeo/extra/job_management/stac_job_db.py", line 230, in _ingest_bulk
_check_response_status(response, _EXPECTED_STATUS_POST)
File "/home/pratixa/.conda/envs/nifi/lib/python3.12/site-packages/openeo/extra/job_management/stac_job_db.py", line 311, in _check_response_status
response.raise_for_status()
File "/home/pratixa/.conda/envs/nifi/lib/python3.12/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://stac-api-dev.vgt.vito.be/collections/cropsar2d_jobdb_test05082025/bulk_items
In case the item_id is not available, it should consider the index as item_id, but then it would be an integer. https://github.com/Open-EO/openeo-python-client/blob/66499f9da31fb967411efb09e0ecd9075caf2e6f/openeo/extra/job_management/stac_job_db.py#L63
So, in this case, shouldn't we mention it to mandatorily have an item_id column that is string or shouldn't they we adapted to take it as string?
- Vorherrschende Sprache
- Python
- Sterne
- 219
- Forks
- 58
- Ø Merge
- 2 T. 19 Std.
- Gemergte PRs (30 T.)
- 10
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus Open-EO/openeo-python-client
-
JupyterLite supportOffenauth feature request
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
Open-EO/openeo-python-client#953 ·
Maintainer antworten meist innerhalb von 1 Tag
-
collect feedback
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
Open-EO/openeo-python-client#952 · 10 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Further decouple CubeMetadata from CollectionMetadata, and properly apply spatio-temporal filteringEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
Open-EO/openeo-python-client#949 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
asset download: support file:local_path to determine target file nameEvtl. vergeben @soxofaan hat das vor 49 Tagen übernommen. Offenfeature request
Open-EO/openeo-python-client#902 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Add split_points functionalityEvtl. vergeben @HansVRP hat das vor 4 Tagen übernommen. Offenjob manager
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
Open-EO/openeo-python-client#899 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in Open-EO/openeo-python-client
Ähnliche Issues
-
Questions crashes on a real SQuAD2 no-answer predictionEvtl. vergeben @HuaTNA hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
GST is read as Gulf Standard Time (UTC+4) instead of Guam Standard Time (UTC+10)Evtl. vergeben @yang00333 hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
DOI-USGS/dataretrieval-python#454 ·
Maintainer antworten meist innerhalb von 4 Tagen
-
area:core-platform effort:S priority:P3 status:in-review type:test
Schwierigkeit 2/5 Unter einer Stunde Anfängerfreundlichkeit 80/100
randomparity/kdive#3246 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Requantification library converts m/z to mass with the hydrogen-atom mass instead of the proton massOffenbug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
nf-core/metaboigniter#130 ·
Maintainer antworten meist innerhalb von 1 Tag
-
netbox status: needs owner type: documentation
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 75/100
netbox-community/netbox#23412 · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag