I have been watching for new release with latest changes to congressional members data.

Comments

dalin’s picture

Status: Active » Postponed (maintainer needs more info)

All data comes from the Sunlight API, they in turn scrape data from various Government websites. The Sunlight API was serving data from the 113th Congress at the beginning of the year:
https://groups.google.com/forum/?fromgroups=#!topic/sunlightlabs/Kuu-Ng9...

I've done a few searches on my primary install of CD Sunlight module and it is returning the expected data.

If there's something in particular about your installation that is not showing updated data you'll need to be more specific.

m.e.’s picture

My site is not showing the new Congresspeople. One example would be the search (views) page at http://www.secularcensus.us/congress Searching for a female Dem from Arizona should give Kyrsten Sinema, but does not.

dalin’s picture

On another site I ran that search and I do see Kyrsten Sinema. Check your logs to ensure that cron is running and completes successfully. Also check the status report for any issues. And visit /admin/settings/cd_sunlight to see if your key is valid.

m.e.’s picture

Thank you. The key is valid, but I am seeing log messages to the effect of "A connection cannot be made to Sunlight, cd_sunlight_cron will not be run." and "A connection cannot be made to Sunlight, cd_civicrm_cron will not be run." What else would cause this?

dalin’s picture

This is the test function that is being called:
http://drupalcode.org/project/cd_sunlight.git/blob/refs/heads/7.x-1.x:/c...

It basically sends a request to Sunlight to find out what districts are in zip code 94111. Sunlight should return a California district.

This is probably failing either because your key is not correct, or because your server cannot contact the outside world. This could be for any number of reasons, most likely firewall related. As a test you could try querying the API directly from the commandline to see what you get:

curl "http://services.sunlightlabs.com/api/districts.getDistrictsFromZip.json?... key]"

m.e.’s picture

Server admin says I need to use GET instead - curl disabled for security reasons. I've done the GET command and receive the error "Invalid API Key." However, the key in my Sunlight account is exactly what I've specified in admin/config/services/cd_sunlight and I've double-checked the GET for accuracy.

m.e.’s picture

Just getting back to this. Support tech has done the CURL command for me and it works fine. Yet my site is still not connecting to Sunlight - I still get errors in the cron log (as above). I've tried creating a new Sunlight key just in case, and CURL works for that too, but the config screen will not let me change to the new key: "Either the Sunlight key is not valid, or the Sunlight API is down. See watchdog for more detailed information." (I have definitely validated the new key.) Still stuck - any ideas?

dalin’s picture

No sorry.

I think your going to have to dig deeper into the code.

m.e.’s picture

Your code or some other part of Drupal? This worked for over a year for me - I am mystified why it no longer does.

dalin’s picture

One place to start might be to place var_export($response); die(); after this line:
http://drupalcode.org/project/cd_sunlight.git/blob/refs/heads/7.x-1.x:/c...
Perhaps there's something blocking PHP from accessing Sunlight (even though curl CLI works).