Skip to content

Fix SAM #1830 on Linux RHEL 8.6 and Windows and MacOS#1204

Closed
sjanzou wants to merge 4 commits intopatchfrom
SAM_1830
Closed

Fix SAM #1830 on Linux RHEL 8.6 and Windows and MacOS#1204
sjanzou wants to merge 4 commits intopatchfrom
SAM_1830

Conversation

@sjanzou
Copy link
Collaborator

@sjanzou sjanzou commented Aug 14, 2024

Test with either building on each platform or using installers

Windows Download: https://samrepo.nrelcloud.org/beta-releases/sam-windows-2023-12-17-r2.exe

Mac Download: https://samrepo.nrelcloud.org/beta-releases/sam-macos-2023-12-17-r2.pkg

Linux Download: https://samrepo.nrelcloud.org/beta-releases/sam-linux-2023-12-17-r2.run

Expected results
Linux
image

MacOS
image

Windows
image

Following up with tests on Windows and MacOS
@sjanzou sjanzou self-assigned this Aug 14, 2024
@sjanzou sjanzou linked an issue Aug 14, 2024 that may be closed by this pull request
@cpaulgilman
Copy link
Collaborator

Testing on Mint 2.1.1 Cinnamon 5.6.8 installed on a Dell Laptop:

PV-Battery / Commercial

image

followed by:

image

@brtietz
Copy link
Collaborator

brtietz commented Aug 15, 2024

@cpaulgilman I'm still subscribed to the hypothesis from the meeting yesterday that the issue is on our end, and there's something strange in the interaction between rapid json and curl, potentially around special characters. Are you able to print the JSON that's being passed to the curl request for the first call to the REopt API?

Possibly related issues from around the internet:
https://stackoverflow.com/questions/47612138/curl-scraping-gives-me-request-rejected-the-requested-url-was-rejected
https://devcommunity.x.com/t/error-invalid-json-could-not-parse-when-making-curl-request/132181

@sjanzou
Copy link
Collaborator Author

sjanzou commented Aug 15, 2024

@cpaulgilman I'm still subscribed to the hypothesis from the meeting yesterday that the issue is on our end, and there's something strange in the interaction between rapid json and curl, potentially around special characters. Are you able to print the JSON that's being passed to the curl request for the first call to the REopt API?

Possibly related issues from around the internet: https://stackoverflow.com/questions/47612138/curl-scraping-gives-me-request-rejected-the-requested-url-was-rejected https://devcommunity.x.com/t/error-invalid-json-could-not-parse-when-making-curl-request/132181

@brtietz , @cpaulgilman , I am still working on testing on the three platforms… the json is not the issue since the same on all three. The built in curl library seems to be causing different responses on the various Linux distros. Also, I am testing using the “failing” json with the reopt examples using python on all platforms. Thanks for the additional testing and the url encoding link!

@sjanzou
Copy link
Collaborator Author

sjanzou commented Aug 19, 2024

Definitely a REopt API issue limiting Content-length after all fixes.

Runs on Ubuntu 20.04 now! (So, mint, too.) Please verify @cpaulgilman using

Linux Download: https://samrepo.nrelcloud.org/beta-releases/sam-linux-2023-12-17-r2.run

@cpaulgilman
Copy link
Collaborator

cpaulgilman commented Aug 19, 2024

@sjanzou On macOS from SAM 2023.12.17 r2 dated August 19, 2024, I get a UI callback error

Could not evaluate callback function:call_reopt->on_change
[91]: error: _s
[12]: eval error in statement list

followed by a SAM Error window:

06:04:48: can't open file '/Applications/SAM_2023.12.17/SAM.app/Contents/MacOS/reopt_jsonpost.json' (error 13: Permission denied)
06:04:48: Could not open file for writing!

Works fine on Windows 11.

@sjanzou
Copy link
Collaborator Author

sjanzou commented Aug 19, 2024 via email

@sjanzou
Copy link
Collaborator Author

sjanzou commented Aug 23, 2024

Branch deleted and pull request closed with NatLabRockies/SAM#1845

@sjanzou sjanzou closed this Aug 23, 2024
@sjanzou sjanzou deleted the SAM_1830 branch August 23, 2024 09:57
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

Successfully merging this pull request may close these issues.

REopt API call fails with callback error

3 participants