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

xml2csv encoding issues #5538

Closed
ambuehll opened this issue Apr 29, 2019 · 2 comments

Comments

@ambuehll
Copy link

commented Apr 29, 2019

Add:

import sys
reload(sys)
sys.setdefaultencoding('utf8')

to xml2csv in order to not throw error for weird encodings.
(probably this is related to #4004)
Should be reproducible with Python >3, and xml here.
One more detail: If applying xml2csv on this file, there are some fails for special characters, it adds a ";" which makes adds an unnecessary field (see edge id="-102173890#0", row 211 in csv).

Cheers,
Lukas

@behrisch

This comment has been minimized.

Copy link
Contributor

commented May 1, 2019

The file works here (Python 3.6.5 on Linux) but I suppose it occurs on windows only because Linux already has utf8 as default encoding. I don't think we are going to implement your solution which seems like a hack to activate a hidden function which deliberately got deleted by the python developers.

@behrisch behrisch self-assigned this May 1, 2019

@behrisch

This comment has been minimized.

Copy link
Contributor

commented May 1, 2019

An error shows up with Python 2.7.14 on Linux as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.