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

Compare individual contributions on election pages not working #1486

Closed
Tracked by #127
patphongs opened this issue Nov 13, 2017 · 4 comments
Closed
Tracked by #127

Compare individual contributions on election pages not working #1486

patphongs opened this issue Nov 13, 2017 · 4 comments
Assignees
Milestone

Comments

@patphongs
Copy link
Member

On the election pages, the individual contributions is not working. See here: https://www.fec.gov/data/elections/house/VA/11/2018/?tab=contributions.

screen shot 2017-11-13 at 2 12 36 pm

There seems to be an issue with by_size aggregates. So the API is returning 500 errors when going to this data type. API call: https://api.open.fec.gov/v1/schedules/schedule_a/by_size/by_candidate/?api_key=5yyI90SU3Xb73TVlv4wrEhQxYcCwMWCywQiGdYbJ&cycle=2018&candidate_id=H8VA11062&candidate_id=H8VA11070&candidate_id=H8VA11088&per_page=0

@LindsayYoung
Copy link
Contributor

This looks like an API/ DB issue

@LindsayYoung LindsayYoung self-assigned this Nov 14, 2017
@lbeaufort
Copy link
Member

This is the error message I get when I try to run this link locally:

Link: http://127.0.0.1:5000/v1/schedules/schedule_a/by_size/by_candidate/?cycle=2018&candidate_id=H8VA11062&candidate_id=H8VA11070&candidate_id=H8VA11088&per_page=0

Error message:
sqlalchemy.exc.ProgrammingError
sqlalchemy.exc.ProgrammingError: (psycopg2.ProgrammingError) relation "ofec_sched_a_aggregate_size_merged_mv_tmp" does not exist
LINE 3: FROM ofec_cand_cmte_linkage_mv JOIN ofec_sched_a_aggregate_s...
^
[SQL: 'SELECT count(*) AS count_1 \nFROM (SELECT ofec_cand_cmte_linkage_mv.cand_id AS ofec_cand_cmte_linkage_mv_cand_id, ofec_cand_cmte_linkage_mv.fec_election_yr AS cycle, ofec_sched_a_aggregate_size_merged_mv_tmp.size AS ofec_sched_a_aggregate_size_merged_mv_tmp_size, sum(ofec_sched_a_aggregate_size_merged_mv_tmp.total) AS total \nFROM ofec_cand_cmte_linkage_mv JOIN ofec_sched_a_aggregate_size_merged_mv_tmp ON ofec_cand_cmte_linkage_mv.cmte_id = ofec_sched_a_aggregate_size_merged_mv_tmp.cmte_id AND ofec_cand_cmte_linkage_mv.fec_election_yr = ofec_sched_a_aggregate_size_merged_mv_tmp.cycle \nWHERE ofec_cand_cmte_linkage_mv.fec_election_yr IN (%(param_1)s) AND ofec_cand_cmte_linkage_mv.cand_id IN (%(cand_id_1)s, %(cand_id_2)s, %(cand_id_3)s) AND ofec_cand_cmte_linkage_mv.cmte_dsgn IN (%(cmte_dsgn_1)s, %(cmte_dsgn_2)s) GROUP BY ofec_cand_cmte_linkage_mv.cand_id, ofec_cand_cmte_linkage_mv.fec_election_yr, ofec_sched_a_aggregate_size_merged_mv_tmp.size) AS anon_1'] [parameters: {'cand_id_2': 'H8VA11070', 'cmte_dsgn_1': 'P', 'cmte_dsgn_2': 'A', 'cand_id_3': 'H8VA11088', 'param_1': 2018, 'cand_id_1': 'H8VA11062'}]

@LindsayYoung
Copy link
Contributor

This update is running it will take a while to finish

@PaulClark2 PaulClark2 added this to the Sprint 4.4 milestone Nov 15, 2017
@LindsayYoung
Copy link
Contributor

This has been working since Nov 14-

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants