mara / mara-pipelines

A lightweight opinionated ETL framework, halfway between plain scripts and Apache Airflow
MIT License
2.07k stars 100 forks source link

fix crash in log #25

Closed ice1e0 closed 4 years ago

ice1e0 commented 4 years ago

logger would through the exception UnicodeEncodeError: 'ascii' codec can't encode character '\uXXXX' in position 0: ordinal not in range 128 and break the execution pipeline with that because an unicode character was used (e.g. BLACK STAR - U+2605)

martin-loetzsch commented 4 years ago

So far we did not have problems with unicode characters in node outputs (some people put a lot of emojis in logs).

Can you post the full strack trace of the Exception? Thanks!

ice1e0 commented 4 years ago

@martin-loetzsch I figured out that my character encoding for the database was ASCII which made it break. Would be helpful to give a hint about this in the readme of https://github.com/mara/mara-example-project#installation

e.g. write

CREATE DATABASE example_project_dwh WITH ENCODING 'UTF8' TEMPLATE=template0;
CREATE DATABASE example_project_mara WITH ENCODING 'UTF8' TEMPLATE=template0;

instead of

CREATE DATABASE example_project_dwh;
CREATE DATABASE example_project_mara;