Closed firstkingofrome closed 6 years ago
Are you using Python 3? (No idea if the code even works on Python 3 though..)
Yes, I am using python 3.4.3, I didn't realize python3 wasn't supported (most of the code seems to work fine on python3, this is the first issue that I have encountered).
On Tue, Apr 10, 2018 at 12:50 AM, Tobias Megies notifications@github.com wrote:
Are you using Python 3? (No idea if the code even works on Python 3 though..)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/shaharkadmiel/pySW4/issues/13#issuecomment-380007640, or mute the thread https://github.com/notifications/unsubscribe-auth/AJ9L5bXHqz5DH2BCre4Z_xyq8J01h5_4ks5tnGQugaJpZM4TNXRU .
I see. Probably there might be more similar problems down the road on Python 3..
In principle those should be easy to fix, just properly need to decode/encode strings coming in/out of pySW4. Somebody would have to work on it though, I won't have time to do so..
Indeed an easy fix... I will work on it later this week... at EGU at the moment...
Ok Thank you (I am probably just going to stick with python 2 because I have also run into some more complicated issues with GDAL under python 3).
I think we should keep this open as a reminder..
should be fixed in master
Issue: pySW4 does not convert projection strings to bytes when using write_hdr function from rfileIO Work Around: manually cast projection string before calling write header, i.e. write_hdr(file,1, 4, 1, 0, 3.5, 28.0, proj_str.encode(),1): Solution: in write_hddr function encode the projection string before attempting to save it to the file