Traceback (most recent call last):


 "/Users/ericely/workspace/test/test_peewee.py", line 48, in test_peewee

print len(records)


 "/Users/ericely/workspace/env/lib/python2.7/site-packages/peewee.py", line 3298, in __len__

return len(self.execute())


 "/Users/ericely/workspace/env/lib/python2.7/site-packages/peewee.py", line 2334, in __len__

return self.count


 "/Users/ericely/workspace/env/lib/python2.7/site-packages/peewee.py", line 2330, in count

self.fill_cache()


 "/Users/ericely/workspace/env/lib/python2.7/site-packages/peewee.py", line 2377, in fill_cache

next(self)


 "/Users/ericely/workspace/env/lib/python2.7/site-packages/peewee.py", line 2363, in next

obj = self.iterate()


 "/Users/ericely/workspace/env/lib/python2.7/site-packages/peewee.py", line 2761, in iterate

instance._data[metadata.foreign_key.name]]
KeyError: None

Traceback (most recent call last):


 "/usr/bin/rtv", line 11, in <module>

load_entry_point('rtv==1.13.0', 'console_scripts', 'rtv')()


 "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 560, in load_entry_point

return get_distribution(dist).load_entry_point(group, name)


 "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2648, in load_entry_point

return ep.load()


 "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2302, in load

return self.resolve()


 "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2308, in resolve

module = __import__(self.module_name, fromlist=['__name__'], level=0)


 "/usr/lib/python3.6/site-packages/rtv/__main__.py", line 169, in <module>

sys.exit(main())


 "/usr/lib/python3.6/site-packages/rtv/__main__.py", line 152, in main

page.loop()


 "/usr/lib/python3.6/site-packages/rtv/page.py", line 78, in loop

self.controller.trigger(ch)


 "/usr/lib/python3.6/site-packages/rtv/objects.py", line 591, in trigger

return func(self.instance, *args, **kwargs)


 "/usr/lib/python3.6/site-packages/rtv/subreddit_page.py", line 126, in open_link

self.open_submission()


 "/usr/lib/python3.6/site-packages/rtv/subreddit_page.py", line 103, in open_submission

url = data['permalink']
KeyError: 'permalink'
