SHEF loader erroring out due to codes that should be skipped

Aperta
#82 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
4
Fork
2
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di HydrologicEngineeringCenter/SHEF_processing

Tutte le issue di HydrologicEngineeringCenter/SHEF_processing

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.