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

SAM Error: Could not inflate stream: Unexpected EOF in underlying stream. #393

Closed
cpaulgilman opened this issue Oct 1, 2020 · 6 comments
Assignees
Milestone

Comments

@cpaulgilman
Copy link
Collaborator

Opening this file in SAM 2020.2.29 for Windows results in error:

image

Also reported by another user here:

https://sam.nrel.gov/forum/forum-general/3146

From Brian:

I pulled this up in the debugger and stepped through it a bit, and came up with the possibly more helpful error message:

16:52:50: discrepancy reading in values from project file: 0 not found, 0 wrong type, 822 read != 824 in config

Looks like maybe there are issues for cases where we adjusted the defaults between patches? Can you get any info on what case(s) are in the file so we have a better shot at reproducing it?

@cpaulgilman cpaulgilman added this to the 2021 Release milestone Oct 1, 2020
@sjanzou
Copy link
Collaborator

sjanzou commented Oct 27, 2020

@cpaulgilman, @brtietz, the discrepancy is from the latest version built from develop for both of the Flat Plate PV / Residential cases in the project file: (code to list missing variables in SAM_393 branch)
02:47:55: discrepancy reading in values from project file: 0 not found, 0 wrong type, 822 read != 824 in config
02:47:55: Flat Plate PV, Residential configuration variable ur_nm_credit_rollover missing from project file
02:47:55: Flat Plate PV, Residential configuration variable ur_nm_credit_month missing from project file
02:47:55: discrepancy reading in values from project file: 0 not found, 0 wrong type, 822 read != 824 in config
02:47:55: Flat Plate PV, Residential configuration variable ur_nm_credit_rollover missing from project file
02:47:55: Flat Plate PV, Residential configuration variable ur_nm_credit_month missing from project file
02:47:55: Error: Can't read inflate stream: unexpected EOF in underlying stream.

The two variable ur_nm_credit_rollover and ur_nm_credit_month will need to be added to the Version upgrade script.

The stream error is caused by a parametrics quick setup read in the second case that will, hopefully, be resolved soon.

@sjanzou
Copy link
Collaborator

sjanzou commented Oct 27, 2020

Add return true if hit end of project file when reading in parametrics – reads in second case from user – go through problematic case:
image

@sjanzou
Copy link
Collaborator

sjanzou commented Oct 27, 2020

There seems to be a limit on number of runs saved – case 2 parametric runs has 4 as in case 1 but last run has only 795 inputs instead of 822 and hits end of file when reading.
image

@sjanzou
Copy link
Collaborator

sjanzou commented Oct 27, 2020

@cpaulgilman, we may need to not save parametrics with cases to prevent these issues in the future - tracking down issue.

@sjanzou
Copy link
Collaborator

sjanzou commented Oct 29, 2020

Fix and test with current problematic project file with known issue:
image

save as new file as instructed and reload without issue:
image

See Pull request #413

@sjanzou
Copy link
Collaborator

sjanzou commented Oct 30, 2020

Closed with pull request #413

@sjanzou sjanzou closed this as completed Oct 30, 2020
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