IQSS / dataverse-sample-data

Scripts and sample data for demo purposes
6 stars 11 forks source link

current state of sample-data on Python-3.8 #29

Open donsizemore opened 2 years ago

donsizemore commented 2 years ago

Ansible sez

"Traceback (most recent call last):\n File \"create_sample_data.py\", line 65, in <module>\n dataset_pid = resp.json()['data']['persistentId']\nKeyError: 'data'", "stderr_lines": ["Traceback (most recent call last):", " File \"create_sample_data.py\", line 65, in <module>", " dataset_pid = resp.json()['data']['persistentId']", "KeyError: 'data'"], "stdout": "Using API token from config file.\nOK\nPublishing root dataverse.\nDataverse :root published.\n<Response [200]>\nCreating dataverse pums.json in dataverse :root\n{'name': 'PUMS', 'alias': 'pums', 'dataverseContacts': [{'contactEmail': 'dataverse@mailinator.com'}], 'affiliation': 'United States Census Bureau', 'description': 'The Census Bureau’s American Community Survey (ACS) Public Use Microdata Sample (PUMS) files enable data users to create custom estimates and tables, free of charge, that are not available through ACS pretabulated data products. The ACS PUMS files are a set of records from individual people or housing units, with disclosure protection enabled so that individuals or housing units cannot be identified. See <a href=\"https://www.census.gov/programs-surveys/acs/microdata.html\">https://www.census.gov/programs-surveys/acs/microdata.html</a>.', 'dataverseType': 'RESEARCHERS'}\nDataverse pums created.\n<Response [201]>\nDataverse pums published.\n<Response [200]>\nCreating dataset 2000pums5.json in dataverse pums\n<Response [400]>", "stdout_lines": ["Using API token from config file.", "OK", "Publishing root dataverse.", "Dataverse :root published.", "<Response [200]>", "Creating dataverse pums.json in dataverse :root", "{'name': 'PUMS', 'alias': 'pums', 'dataverseContacts': [{'contactEmail': 'dataverse@mailinator.com'}], 'affiliation': 'United States Census Bureau', 'description': 'The Census Bureau’s American Community Survey (ACS) Public Use Microdata Sample (PUMS) files enable data users to create custom estimates and tables, free of charge, that are not available through ACS pretabulated data products. The ACS PUMS files are a set of records from individual people or housing units, with disclosure protection enabled so that individuals or housing units cannot be identified. See <a href=\"https://www.census.gov/programs-surveys/acs/microdata.html\">https://www.census.gov/programs-surveys/acs/microdata.html</a>.', 'dataverseType': 'RESEARCHERS'}", "Dataverse pums created.", "<Response [201]>", "Dataverse pums published.", "<Response [200]>", "Creating dataset 2000pums5.json in dataverse pums", "<Response [400]>"]}

5.10.1 server.log sez

Error parsing dataset json. Json: {"datasetVersion": {"id": 4, "datasetId": 12, "datasetPersistentId": "doi:10.5072/FK2/QWVFK0", "storageIdentifier": "file://10.5072/FK2/QWVFK0", "versionNumber": 1, "versionMinorNumber": 0, "versionState": "RELEASED", "UNF": "UNF:6:VDyWtJrNd0VRwAumtzYA1Q==", "lastUpdateTime": "2021-09-20T18:38:32Z", "releaseTime": "2021-09-20T18:38:32Z", "createTime": "2021-09-20T18:16:38Z", "license": "CC0", "termsOfUse": "CC0 Waiver", "fileAccessRequest": false, "metadataBlocks": {"citation": {"displayName": "Citation Metadata", "fields": [{"typeName": "title", "multiple": false, "typeClass": "primitive", "value": "2000 PUMS 5-Percent"}, {"typeName": "author", "multiple": true, "typeClass": "compound", "value": [{"authorName": {"typeName": "authorName", "multiple": false, "typeClass": "primitive", "value": "United States Census Bureau"}}]}, {"typeName": "datasetContact", "multiple": true, "typeClass": "compound", "value": [{"datasetContactName": {"typeName": "datasetContactName", "multiple": false, "typeClass": "primitive", "value": "United States Census Bureau"}, "datasetContactEmail": {"typeName": "datasetContactEmail", "multiple": false, "typeClass": "primitive", "value": "dataverse@mailinator.com"}}]}, {"typeName": "dsDescription", "multiple": true, "typeClass": "compound", "value": [{"dsDescriptionValue": {"typeName": "dsDescriptionValue", "multiple": false, "typeClass": "primitive", "value": "PUMS files have state-level Census 2000 data containing individual records of the characteristics for a 5 percent sample of people and housing units.\n\nThe PUMS files contain geographic units known as super-Public Use Microdata Areas (super-PUMAs) and Public Use Microdata Areas (PUMAs). Each super-PUMA contains a minimum population of 400,000 and each PUMA contains a minimum population threshold of 100,000. Geographic equivalency files that show the relationship between the PUMA and standard Census 2000 geographic concepts (e.g., counties, etc.) are included.\n\nSee <a href=\"https://www.census.gov/data/datasets/2000/dec/microdata.html\">https://www.census.gov/data/datasets/2000/dec/microdata.html</a>"}}]}, {"typeName": "subject", "multiple": true, "typeClass": "controlledVocabulary", "value": ["Social Sciences"]}, {"typeName": "depositor", "multiple": false, "typeClass": "primitive", "value": "Admin, Dataverse"}, {"typeName": "dateOfDeposit", "multiple": false, "typeClass": "primitive", "value": "2021-09-20"}]}}, "citation": "United States Census Bureau, 2021, \"2000 PUMS 5-Percent\", https://doi.org/10.5072/FK2/QWVFK0, Root, V1, UNF:6:VDyWtJrNd0VRwAumtzYA1Q== [fileUNF]"}}

pdurbin commented 2 years ago

Error parsing dataset json

This is due to backward incompatibility introduced with multiple licenses in 5.10. I just created an issue about this: