-
Notifications
You must be signed in to change notification settings - Fork 5
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
Public Data Listing button gives internal server error in some cases #51
Comments
I noticed yesterday (or maybe since the Tuesday release) that the creation of the JSON file was taking a lot longer than previously. I'm not sure why, but probably something different is happening behind the scenes. The request eventually works for me, but I wouldn't be surprised if it's approaching a request timeout limit, and I'm only running it on 15 datasets so far. |
I'm trying to think what has changed:
|
+1 I've noticed the same behavior and the same timing. @dwcaraway: any ideas? @kvuppala, we might need you or yours to find out how we get our hands on the logs for this. |
+1 |
Not sure if you guys are using a similar approach as this project, but you may want to check out this pull request: |
Reviewing the logs, I'm seeing a recurring apache error log entry:
From reviewing the logs, every exceptions.KeyError occurrence was due to 'public_access_level' and all resulted in an HTTP 500 exception. From looking at https://github.com/GSA/ckanext-datajson/blob/master/ckanext/datajson/plugin.py it appears that the below code snippet is the suspect:
Will fix by changing the 'public_access_level' to a get call with a default value of 'Public' |
…eturning an HTTP 500 error when the datasets does not have a 'public_access_level' extras field. Modified so that if this extra isn't found, we default to public access level.
On my local machine, I verified this fix by creating a dataset, then editing the dataset and deleting the 'public_access_level' field, then selecting the public data listing button and verifying that a data.json is rendered. I also tested by creating an organization with no datasets and verifying that both the public data listing and enterprise data inventory buttons render a data.json file. this fix will deploy to staging and production on Tuesday, 3 December. I will close out the ticket once the fix is verified in staging. |
Fix is in production and appears to be working. |
…eturning an HTTP 500 error when the datasets does not have a 'public_access_level' extras field. Modified so that if this extra isn't found, we default to public access level.
loged into the inventory as ckan admin,
go to http://inventory.data.gov/organization/aphis-usda-gov and click on the "Public Data Listing" button generates an 500 internal server error.
The text was updated successfully, but these errors were encountered: