open-contracting / kingfisher-collect

Downloads OCDS data and stores it on disk
https://kingfisher-collect.readthedocs.io
BSD 3-Clause "New" or "Revised" License
13 stars 12 forks source link

kosovo: Empty (or missing) date fields #1057

Open sentry-io[bot] opened 7 months ago

sentry-io[bot] commented 7 months ago
gunzip -c /data/storage/exporter_dumps/1523/full.jsonl.gz | jq -cM 'select(.date == "")'

In the data registry, we write these undated compiled releases to the full file, then log an exception, and continue processing other compiled releases:

https://github.com/open-contracting/data-registry/blob/22645317a2a33f93d53b0c766d0f0851e39e20fd/exporter/management/commands/exporter.py#L82-L91


ValueError: time data '' does not match format '%Y-%m'

Sentry Issue: REGISTRY-4G

ValueError: time data '' does not match format '%Y-%m'
  File "exporter/management/commands/exporter.py", line 88, in callback
    date = datetime.strptime(date[:7], "%Y-%m")

Bad compiled release date: ''