Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

STAC Job Manager: item_id must be string

Đang mở
#792 8 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
pandas, python
Lĩnh vực
databases

Hướng nghiên cứu

Bắt đầu từ dòng được liên kết trong openeo/extra/job_management/stac_job_db.py và lần theo initialize_from_df qua persist đến bước upload item. So sánh hành vi của chỉ mục fallback với yêu cầu ID dạng chuỗi của STAC Item; được xem là hoàn tất khi policy đã chọn được nêu rõ và đường dẫn tạo item không còn gửi ID số nguyên.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

job manager

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?

Ngôn ngữ chính
Python
Star
219
Fork
58
Merge trung bình
2 ngày 19 giờ
Pull request đã merge (30 ngày)
10

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Open-EO/openeo-python-client

Tất cả issue của Open-EO/openeo-python-client

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.