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

Fix nndc._request() #379

Merged
merged 1 commit into from
Aug 10, 2023
Merged

Conversation

tannerdalen
Copy link
Contributor

As of about two weeks ago, requesting data from .jsp sites (like https://www.nndc.bnl.gov/nudat3/sigma_searchi.jsp) for wallet card and decay data information began returning empty request errors: "NNDCRequestError: Request failed: "

image

After speaking with a Technology Analyst at Brookhaven, they concluded a few things. sigma_searchi.jsp provides a response object with "ok == True" and "status_code == 200". It's "reason" field is set to an empty string instead of "OK". In line 439, the 'resp.reason != "OK"' condition causes _request() to fail, despite NNDC returning data. Removing this condition fixes it and returns data successfully.

image

As of about two weeks ago, requesting data from .jsp sites (like https://www.nndc.bnl.gov/nudat3/sigma_searchi.jsp) for wallet card and decay data information began returning blank request errors: "NNDCRequestError: Request failed: "

sigma_searchi.jsp provides a response object with "ok == True" and "status_code == 200". It's "reason" field is set to an empty string instead of "OK". 

In line 439, the 'resp.reason != "OK"' condition causes _request() to fail, despite NNDC returning data. Removing this fixes this and returns data successfully.
@markbandstra
Copy link
Member

Wow, thanks @tannerdalen for digging into this! Some of us had started to notice this problem but hadn't looked into it. Glad it is a simple fix.

Hope you are getting good use out of becquerel, please let us know when you notice other bugs or have other features you would like to see!

@markbandstra markbandstra merged commit 03a3eea into lbl-anp:main Aug 10, 2023
@tannerdalen
Copy link
Contributor Author

Awesome, will do. Thanks!

@tannerdalen tannerdalen deleted the nndc_requests_patch branch August 10, 2023 21:30
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.

2 participants