We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I ran the script for the 118th Congress and some KeyErrors popped up while processing amendments. Could there be a new schema?
Here's a snippet of the error output where activities, description, and proposedDate weren't recognized.
activities
description
proposedDate
[33mcongress-library_1 |�[0m [s4003-117] Exception: �[33mcongress-library_1 |�[0m �[33mcongress-library_1 |�[0m Traceback (most recent call last): �[33mcongress-library_1 |�[0m �[33mcongress-library_1 |�[0m File "/usr/local/lib/python3.8/site-packages/congress/tasks/utils.py", line 174, in process_set �[33mcongress-library_1 |�[0m results = fetch_func(id, options, *extra_args) �[33mcongress-library_1 |�[0m �[33mcongress-library_1 |�[0m File "/usr/local/lib/python3.8/site-packages/congress/tasks/bills.py", line 148, in process_bill �[33mcongress-library_1 |�[0m process_amendments(bill_id, xml_as_dict, options) �[33mcongress-library_1 |�[0m �[33mcongress-library_1 |�[0m File "/usr/local/lib/python3.8/site-packages/congress/tasks/bills.py", line 292, in process_amendments �[33mcongress-library_1 |�[0m amendment_info.process_amendment(amdt, bill_id, options) �[33mcongress-library_1 |�[0m �[33mcongress-library_1 |�[0m File "/usr/local/lib/python3.8/site-packages/congress/tasks/amendment_info.py", line 25, in process_amendment �[33mcongress-library_1 |�[0m xml_file.write(create_govtrack_xml(amdt, options)) �[33mcongress-library_1 |�[0m �[33mcongress-library_1 |�[0m File "/usr/local/lib/python3.8/site-packages/congress/tasks/amendment_info.py", line 116, in create_govtrack_xml �[33mcongress-library_1 |�[0m make_node(root, "description", amdt["description"] if amdt["description"] else amdt["purpose"]) �[33mcongress-library_1 |�[0m �[33mcongress-library_1 |�[0m KeyError: 'description' �[33mcongress-library_1 |�[0m �[33mcongress-library_1 |�[0m �[33mcongress-library_1 |�[0m [s4008-117] Exception: �[33mcongress-library_1 |�[0m �[33mcongress-library_1 |�[0m Traceback (most recent call last): �[33mcongress-library_1 |�[0m �[33mcongress-library_1 |�[0m File "/usr/local/lib/python3.8/site-packages/congress/tasks/utils.py", line 174, in process_set �[33mcongress-library_1 |�[0m results = fetch_func(id, options, *extra_args) �[33mcongress-library_1 |�[0m �[33mcongress-library_1 |�[0m File "/usr/local/lib/python3.8/site-packages/congress/tasks/bills.py", line 148, in process_bill �[33mcongress-library_1 |�[0m process_amendments(bill_id, xml_as_dict, options) �[33mcongress-library_1 |�[0m �[33mcongress-library_1 |�[0m File "/usr/local/lib/python3.8/site-packages/congress/tasks/bills.py", line 292, in process_amendments �[33mcongress-library_1 |�[0m amendment_info.process_amendment(amdt, bill_id, options) �[33mcongress-library_1 |�[0m �[33mcongress-library_1 |�[0m File "/usr/local/lib/python3.8/site-packages/congress/tasks/amendment_info.py", line 13, in process_amendment �[33mcongress-library_1 |�[0m amdt = build_amendment_json_dict(amdt_data, options) �[33mcongress-library_1 |�[0m �[33mcongress-library_1 |�[0m File "/usr/local/lib/python3.8/site-packages/congress/tasks/amendment_info.py", line 72, in build_amendment_json_dict �[33mcongress-library_1 |�[0m amdt['proposed_at'] = amdt_dict['proposedDate'] �[33mcongress-library_1 |�[0m �[33mcongress-library_1 |�[0m KeyError: 'proposedDate' �[33mcongress-library_1 |�[0m �[33mcongress-library_1 |�[0m �[33mcongress-library_1 |�[0m [s4065-117] Exception: �[33mcongress-library_1 |�[0m �[33mcongress-library_1 |�[0m Traceback (most recent call last): �[33mcongress-library_1 |�[0m �[33mcongress-library_1 |�[0m File "/usr/local/lib/python3.8/site-packages/congress/tasks/utils.py", line 174, in process_set �[33mcongress-library_1 |�[0m results = fetch_func(id, options, *extra_args) �[33mcongress-library_1 |�[0m �[33mcongress-library_1 |�[0m File "/usr/local/lib/python3.8/site-packages/congress/tasks/bills.py", line 127, in process_bill �[33mcongress-library_1 |�[0m bill_data = form_bill_json_dict(xml_as_dict) �[33mcongress-library_1 |�[0m �[33mcongress-library_1 |�[0m File "/usr/local/lib/python3.8/site-packages/congress/tasks/bills.py", line 257, in form_bill_json_dict �[33mcongress-library_1 |�[0m 'committees': bill_info.committees_for(billCommittees), �[33mcongress-library_1 |�[0m �[33mcongress-library_1 |�[0m File "/usr/local/lib/python3.8/site-packages/congress/tasks/bill_info.py", line 267, in committees_for �[33mcongress-library_1 |�[0m return sum([build_dict(committee) for committee in committee_list], []) �[33mcongress-library_1 |�[0m �[33mcongress-library_1 |�[0m File "/usr/local/lib/python3.8/site-packages/congress/tasks/bill_info.py", line 267, in <listcomp> �[33mcongress-library_1 |�[0m return sum([build_dict(committee) for committee in committee_list], []) �[33mcongress-library_1 |�[0m �[33mcongress-library_1 |�[0m File "/usr/local/lib/python3.8/site-packages/congress/tasks/bill_info.py", line 249, in build_dict �[33mcongress-library_1 |�[0m 'activity': get_activitiy_list(item), �[33mcongress-library_1 |�[0m �[33mcongress-library_1 |�[0m File "/usr/local/lib/python3.8/site-packages/congress/tasks/bill_info.py", line 237, in get_activitiy_list �[33mcongress-library_1 |�[0m if not item['activities']: �[33mcongress-library_1 |�[0m �[33mcongress-library_1 |�[0m KeyError: 'activities'
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I ran the script for the 118th Congress and some KeyErrors popped up while processing amendments. Could there be a new schema?
Here's a snippet of the error output where
activities
,description
, andproposedDate
weren't recognized.The text was updated successfully, but these errors were encountered: