Luftdatenpumpe: "UnicodeEncodeError" when emitting data to PostGIS


i try to install the Luftdatenpumpe at a Debian 11.
I get a failure if i try to do this step " Run luftdatenpumpe for the first time to manifest database schema:"

2022-12-10 20:57:54,783 [luftdatenpumpe.engine               ] INFO   : Emitting to target data sinks, this might take some time
  0%|                                                           | 0/2 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "/usr/local/bin/luftdatenpumpe", line 8, in <module>
  File "/usr/local/lib/python3.9/dist-packages/luftdatenpumpe/", line 186, in run
  File "/usr/local/lib/python3.9/dist-packages/luftdatenpumpe/", line 327, in run_engine
  File "/usr/local/lib/python3.9/dist-packages/luftdatenpumpe/", line 73, in process
  File "/usr/local/lib/python3.9/dist-packages/luftdatenpumpe/target/", line 78, in emit
    return self.store_station(station)
  File "/usr/local/lib/python3.9/dist-packages/luftdatenpumpe/target/", line 199, in store_station
    self.stationtable.upsert(stationdata, ["station_id"])
  File "/usr/local/lib/python3.9/dist-packages/dataset/", line 264, in upsert
    row_count = self.update(row, keys, ensure=False, return_count=True)
  File "/usr/local/lib/python3.9/dist-packages/dataset/", line 210, in update
    rp = self.db.executable.execute(stmt)
  File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/engine/", line 1011, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/sql/", line 298, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/engine/", line 1124, in _execute_clauseelement
    ret = self._execute_context(
  File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/engine/", line 1316, in _execute_context
  File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/engine/", line 1514, in _handle_dbapi_exception
    util.raise_(exc_info[1], with_traceback=exc_info[2])
  File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/util/", line 182, in raise_
    raise exception
  File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/engine/", line 1276, in _execute_context
  File "/usr/local/lib/python3.9/dist-packages/sqlalchemy/engine/", line 608, in do_execute
    cursor.execute(statement, parameters)
UnicodeEncodeError: 'ascii' codec can't encode character '\xfc' in position 41: ordinal not in range(128)

How can i fix this issue?


Hi Oliver,

thank you for writing in, and for creating an issue over at `UnicodeEncodeError` when emitting data to PostGIS · Issue #42 · earthobservations/luftdatenpumpe · GitHub. It was the right choice to report such a problem. I hope we can resolve the problem you are observing.

With kind regards,

1 Like

The problem has been resolved be reinstalling the software, including Luftdatenpumpe. Thanks, @oliverr.

`UnicodeEncodeError` when emitting station data to PostGIS · Issue #42 · earthobservations/luftdatenpumpe · GitHub