Issues with ABC4Kids

Issue #15 resolved
Kelvin Proctor created an issue

Hi James,

Thanks for the great scripts. It has saved me having to write them myself.

I'm having some trouble with ABC4Kids at the moment. I'm selecting this via ABC iView (1) -> By Channel (2) -> ABC4Kids (4).

At this point the script usually hangs. If I kill it (ctrl-c) and restart it I get the following traceback:

Traceback (most recent call last):
  File "./grabber.py", line 55, in <module>
    main()
  File "./grabber.py", line 35, in main
    for n in node.get_children():
  File "/home/devel/webdl/common.py", line 41, in get_children
    self.fill_children()
  File "/home/devel/webdl/iview.py", line 70, in fill_children
    info = grab_json(self.url, 3600)
  File "/home/devel/webdl/common.py", line 143, in grab_json
    doc = json.load(f)
  File "/usr/lib64/python2.7/json/__init__.py", line 290, in load
    **kw)
  File "/usr/lib64/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib64/python2.7/json/decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib64/python2.7/json/decoder.py", line 381, in raw_decode
    obj, end = self.scan_once(s, idx)
ValueError: Expecting object: line 5511 column 17 (char 278527)

I've removed all the cache files from ~/.cache/webdl/ in case that caused the problem, but that just gets me back to the lockup.

I've attached the cache file that is generated. It is about 278k and appears to be a truncated JSON file. I'm not 100% sure what to read into that.

At the point I hit ctrl-c I had tcpdump running and saw that there was no traffic coming or going from the ABC site, so I don't think it was mid-download.

I believe I'm running the latest version of the code as per the following:

[devel@localhost webdl]$ hg summary
parent: 105:453c114d70cc tip
 webdl: utf-8 encode string before printing
branch: default
commit: (clean)
update: (current)

This is running on a CentOS 7 box. It had been running very nicely up until approximately this week.

Unfortunately I'm not all that familiar with Python debugging so haven't been able to get more of a hold on the issue.

Hopefully you can reproduce the issue, if not please let me know what diagnostics you would like.

Regards, Kelvin

Comments (2)

  1. Log in to comment