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

IndexError #53

Closed
krmaxwell opened this issue Sep 2, 2014 · 4 comments
Closed

IndexError #53

krmaxwell opened this issue Sep 2, 2014 · 4 comments
Labels

Comments

@krmaxwell
Copy link
Member

While working on repro for #49 got:

(venv)kmaxwell@newton:~/src/combine$ python thresher.py
Loading raw feed data from harvest.json
[...]
Parsing feed from http://www.autoshun.org/files/shunlist.csv
Traceback (most recent call last):
  File "thresher.py", line 189, in <module>
    thresh('harvest.json', 'crop.json')
  File "thresher.py", line 166, in thresh
    harvest += thresher_map[site](response[2], response[0], 'inbound')
  File "thresher.py", line 108, in process_autoshun
    date = line.split(',')[1].split()[0]
IndexError: list index out of range
@jedisct1
Copy link
Contributor

jedisct1 commented Sep 2, 2014

Saw this issue as well.

But testing for a specific error message might not be a good way to fix this.

Feeds (all of them) can fail for many different reasons, and return a variety of error messages, from Nginx errors to MySQL errors.

@krmaxwell
Copy link
Member Author

@jedisct1: Indeed and I really need to refactor the whole "raw text parsing" thing soon. That's the proper fix. This is just a bandage to stop the bleeding.

@alexcpsec
Copy link
Member

@technoskald I believe when the "plugin" infra (#23) is implemented we should take better care of this, no?

@krmaxwell krmaxwell added the bug label Sep 2, 2014
@krmaxwell
Copy link
Member Author

Yeah, that too.

krmaxwell added a commit that referenced this issue Sep 4, 2014
Fixes #53 by testing for error message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants