OpenEnergyPlatform / omi

Repository for the Open Metadata Integration (OMI). For metadata definition see metadata repo:
https://github.com/OpenEnergyPlatform/metadata
GNU Affero General Public License v3.0
7 stars 4 forks source link

decode-function fails in python3 #9

Closed christian-rli closed 5 years ago

christian-rli commented 5 years ago

I ran into this error:

  File "/home/christianh/Schreibtisch/omi/env/lib/python3.7/site-packages/omi-0.0.2-py3.7.egg/omi/cli.py", line 42, in translate
    outfile.write(s.decode("utf-8"))
AttributeError: 'str' object has no attribute 'decode'

Stackoverflow suggests to simply drop the .decode("utf8"), because with python3 all strings are unicode objects already. Removing it worked for me and the cli worked afterwards. Going to push it in a new branch and create a PR.

MGlauer commented 5 years ago

Closed in #10