mellort/reddit_api — Issue #49: LoggedInRedditor.my_reddits() error
Author: john2x
Created: 2012-01-11 08:51:42+00:00
State: open

When using `r.user.my_reddits()`, I get the error

Traceback (most recent call last):
File "/home/john/.virtualenvs/rdoqdoq/lib/python2.7/site-packages/flask/app.py", line 1518, in __call__
return self.wsgi_app(environ, start_response)
File "/home/john/.virtualenvs/rdoqdoq/lib/python2.7/site-packages/flask/app.py", line 1506, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/home/john/.virtualenvs/rdoqdoq/lib/python2.7/site-packages/flask/app.py", line 1504, in wsgi_app
response = self.full_dispatch_request()
File "/home/john/.virtualenvs/rdoqdoq/lib/python2.7/site-packages/flask/app.py", line 1264, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/john/.virtualenvs/rdoqdoq/lib/python2.7/site-packages/flask/app.py", line 1262, in full_dispatch_request
rv = self.dispatch_request()
File "/home/john/.virtualenvs/rdoqdoq/lib/python2.7/site-packages/flask/app.py", line 1248, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/john/Projects/rdoqdoq/app.py", line 110, in login
my_reddits.append(subreddits.next())
File "/home/john/.virtualenvs/rdoqdoq/src/reddit/reddit/__init__.py", line 221, in get_content
root = page_data[root_field]
TypeError: string indices must be integers

Here's what I got when printing variables in `get_content()` method:

page_url => 'http://www.reddit.com/reddits/mine/
url_data => {}
page_data => {}
root_field => 'data'

So... `page_data` is an empty dict but being indexed by `root_field`?

I can't figure out why `page_data = self.request_json(page_url, url_data=url_data)` is returning an empty dict.

I hope this makes sense.