SHEF loader erroring out due to codes that should be skipped

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

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
55/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
data-engineering

Hướng nghiên cứu

Start by locating the SHEF loader and its handling of unexpected data string items and unknown PE codes, then trace how parsed values are sent to CDA. Reproduce with a file containing codes absent from the SHEF Data Acquisition list and compare it with the working district-only file. Done means unmapped values are handled as intended and processing no longer fails with CDA 400 responses.

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

Mô tả

We receive files from division that contain more data than we necessarily process. We have a script to grab the file from LPMS and process data. When we use it to process a file that contains data for only our district, it runs without errors.

When we use it on data that contains values which are not in our SHEF Data Acquisition list, it errors out and exits.

The output starts with long list of this type of error
ERROR:lpms_shef:Unexpected data string item: [1] in message starting at in-memory stream:2735
ERROR:lpms_shef:Unexpected data string item: [1] in message starting at in-memory stream:2737
ERROR:lpms_shef:Unexpected data string item: [1] in message starting at in-memory stream:2740
ERROR:lpms_shef:Unexpected data string item: [1] in message starting at in-memory stream:2742
ERROR:lpms_shef:Unexpected data string item: [1] in message starting at in-memory stream:2743

Then goes to a long list of these type of warnings
WARNING:lpms_shef:Unknown PE code: [YN], value(s) will be untransformed in message starting at in-memory stream:3883
WARNING:lpms_shef:Unknown PE code: [YW], value(s) will be untransformed in message starting at in-memory stream:3884
WARNING:lpms_shef:Unknown PE code: [YZ], value(s) will be untransformed in message starting at in-memory stream:3887

Then
ERROR:root:CDA Error: response=<Response [400]>
ERROR:root:CDA Error: response=<Response [400]>

This is the error that causes the script to fail

Image

That path is mapped in the database. It appears correct. The script does work with the file where all values are mapped and writes to the test database.

Ngôn ngữ chính
Python
Star
4
Fork
2
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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 HydrologicEngineeringCenter/SHEF_processing

Tất cả issue của HydrologicEngineeringCenter/SHEF_processing

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.