Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing historical data from LDI croaks #10

Closed
amotl opened this issue Sep 28, 2019 · 2 comments
Closed

Importing historical data from LDI croaks #10

amotl opened this issue Sep 28, 2019 · 2 comments

Comments

@amotl
Copy link
Member

amotl commented Sep 28, 2019

When looking at #9, we found that luftdatenpumpe would croak when importing historical data from luftdaten.info being invoked by

luftdatenpumpe readings --network=ldi --source=file:///var/spool/archive.luftdaten.info

like

2019-09-28 22:59:12,344 [luftdatenpumpe.source.luftdaten_info] ERROR  : Could not make observation from {'timestamp': '2015-10-01T14:02:48.841131+00:00', 'location': {'id': 19, 'latitude': 48.722, 'longitude': 9.209}, 'sensor': {'id': 39, 'sensor_type': {'name': 'PPD42NS'}}}
Traceback (most recent call last):
  File "/Users/amo/dev/daq-tools/sources/luftdatenpumpe/luftdatenpumpe/source/luftdaten_info.py", line 374, in csv_reader
    reading = self.make_reading(csv_record)
  File "/Users/amo/dev/daq-tools/sources/luftdatenpumpe/luftdatenpumpe/source/luftdaten_info.py", line 144, in make_reading
    sensor_type_id = item['sensor']['sensor_type']['id']
KeyError: 'id'

@wetterfrosch also noticed this problem the other day.

@amotl amotl changed the title Program croaks when importing historical data from LDI Importing historical data from LDI croaks Sep 28, 2019
@amotl
Copy link
Member Author

amotl commented Sep 28, 2019

This problem has probably been introduced by 4532407.

amotl added a commit that referenced this issue Sep 28, 2019
@amotl
Copy link
Member Author

amotl commented Sep 28, 2019

The issue has been mitigated by 65865ec. Enjoy.

@amotl amotl closed this as completed Sep 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant