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

mfile_skip getting ignored in pf.add_parameters() #564

Open
kmarkovich opened this issue Dec 16, 2024 · 6 comments · Fixed by #565
Open

mfile_skip getting ignored in pf.add_parameters() #564

kmarkovich opened this issue Dec 16, 2024 · 6 comments · Fixed by #565

Comments

@kmarkovich
Copy link

Hi, I am trying to add parameters from an ascii file (attached) that has some rows at the top that need to be skipped. Getting an error "could not convert string to float: 'ncols'" which suggests that pyemu is still trying to read that first line.
AWC_subset.txt

@briochh
Copy link
Collaborator

briochh commented Dec 16, 2024

hey @kmarkovich,
Thanks! looks like you have caught one! I'll get a fix plumbed in.

@kmarkovich
Copy link
Author

right on, thanks @briochh !

@kmarkovich
Copy link
Author

@briochh mfile_skip should still preserve those skipped lines when writing out the file, no? looks like it's dropping them in the written out file

@briochh
Copy link
Collaborator

briochh commented Dec 17, 2024

it's a good point @kmarkovich, I think the answer should be probably, yes. Seems our (lazy) preservation of headers might have been limited to list-like files. I'll look at a patch. Might take a moment.

@briochh
Copy link
Collaborator

briochh commented Dec 19, 2024

@kmarkovich, I have a probable fix pushed to develop now. See how this works for you.

@kmarkovich
Copy link
Author

works like a dream!

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

Successfully merging a pull request may close this issue.

2 participants