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

Overflow issue in reading DFS2. #15

Open
amit-ramboll opened this issue Oct 12, 2021 · 6 comments
Open

Overflow issue in reading DFS2. #15

amit-ramboll opened this issue Oct 12, 2021 · 6 comments

Comments

@amit-ramboll
Copy link

When i read DFS2 file overflow error happened. (ArgumentError: argument 2: <class 'OverflowError'>: int too long to convert)
I am using latest mikeio version.

mike_io_dfs2
.

@ecomodeller
Copy link
Member

This is the first time I have sen this with a Dfs2 file.

Can you provide some additional info on which tool/engine that produced the file and the dimensions and a few screenshots from Mike zero with item info, dimensions, spatial axis info etc.

@amit-ramboll
Copy link
Author

DFS2 files produced from MIKE SHE.
Please see attached images.
image
image
image
image

@amit-ramboll
Copy link
Author

Please find the sample file from that link.
https://github.com/amit-ramboll/Python-MIKE/blob/main/Data/BalEge_Ref_2DSZ.dfs2)

@amit-ramboll
Copy link
Author

what is the issue, in file or any python library?

@ecomodeller ecomodeller transferred this issue from DHI/mikeio Oct 18, 2021
@ecomodeller
Copy link
Member

The problem is in the decoding it in python.

You can try to use an older version MIKE IO v 0.6.4 which is based on the .NET SDK, and see if this is any different, until @JesperGr have time to look at this file.

pip install mikeio==0.6.4

@JesperGr
Copy link
Collaborator

JesperGr commented May 9, 2022

I did try today to reproduce this issue. But I could not. It works all fine to call

'dfs2File = DfsFileFactory.Dfs2FileOpen('BalEge_Ref_2DSZ.dfs2')'

Can you please try with the lastest version of mikeio to see if the problem is still there.

There was a fix on August 27 2021 stating "Fixing reading and writing encoding keys, used by most dfs3 files.". I am suspecting that mikeio did not include that fix at that point in time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants