USEPA / SWMM-EPANET_User_Interface

User interface for the Stormwater-Management-Model
112 stars 67 forks source link

Unicode Issue #288

Closed MatiasSeoane closed 5 years ago

MatiasSeoane commented 6 years ago

I get the next message when i try to run a model (it worked fine in other cases):

'ascii' codec can't encode character u'\xe9' in position 20: ordinal not in range(128)

I've checked my inp file and there are no latin characters or anything like that.

Skulldron commented 5 years ago

Check if file path contains any strange characters

michaeltryby commented 5 years ago

@MatiasSeoane we kindly request that you attach the input file to the Issue so we may investigate. Thank you!

michelleannesimon commented 5 years ago

Still needs more documentation to resolve this comment.

michelleannesimon commented 5 years ago

Does support request mean that we need more information to understand the issue?

dickinsonre commented 5 years ago

I don't know if that helps but I often get a odd input file for SWMM5 and have to resave it from Excel in a plain MSDOS format. This is especially a common problem with SWMM5 calibration files.

Skulldron commented 5 years ago

I got this error message when characters like ą, ś, ć, ź, ó etc. were in input file or in path to file. Had to remove or replace them or change path.

MatiasSeoane commented 5 years ago

I've already checked that before there are no strange characters, inp file is in the next link:

https://drive.google.com/open?id=19nD05GyIiKUSOhH10ZCKSXypgWXQEd_v

TongZhai commented 5 years ago

@MatiasSeoane We are revisiting this issue. If you can provide the input file again, as the input file link is not working anymore. Anyway, this has to do with the codec used for writing and reading an input file, we are enforcing utf8 encoding that can't handle some of the latin1 characters, we will review places in the input file reader/writer that we can relax encoding, your example input file should help finding those.

TongZhai commented 5 years ago

The fix allows special latin1 characters (some perhaps), also still catches bad file such as binary file as input.