Subber fetches recommended subs for a user without interruption.
2017-12-15 18:39:29,230 Retrieving user submissions for user agom94
2017-12-15 18:39:29,230 User submissions retrieved for user agom94
2017-12-15 18:39:29,230 User submissions retrieved as <praw.models.listing.generator.ListingGenerator object at 0x7f77c8c28d68>
2017-12-15 18:39:29,231 Fetching: GET https://oauth.reddit.com/user/agom94/submitted
2017-12-15 18:39:29,231 Data: None
2017-12-15 18:39:29,231 Params: {'t': 'all', 'sort': 'top', 'limit': 13, 'raw_json': 1}
2017-12-15 18:39:29,386 https://oauth.reddit.com:443 "GET /user/agom94/submitted?t=all&sort=top&limit=13&raw_json=1 HTTP/1.1" 200 970
2017-12-15 18:39:29,388 Response: 200 (970 bytes)
2017-12-15 18:39:29,389 Fetching: GET https://oauth.reddit.com/comments/60i9qv/
2017-12-15 18:39:29,389 Data: None
2017-12-15 18:39:29,389 Params: {'limit': 2048, 'sort': 'best', 'raw_json': 1}
2017-12-15 18:39:29,602 https://oauth.reddit.com:443 "GET /comments/60i9qv/?limit=2048&sort=best&raw_json=1 HTTP/1.1" 200 2946
2017-12-15 18:39:29,604 Response: 200 (2946 bytes)
2017-12-15 18:39:29,608 Returning commenters and users as ['techminder', 'Zapablast05', 'SreaminGinger', 'eodizzlez', 'lakk'] for user agom94
2017-12-15 18:39:29,608 Retrieving active subs for user techminder
2017-12-15 18:39:29,609 User's comments retrieved for user techminder as <praw.models.listing.generator.ListingGenerator object at 0x7f77c8c28d68>
2017-12-15 18:39:29,609 Retrieving user submissions for user techminder
2017-12-15 18:39:29,609 User submissions retrieved for user techminder
2017-12-15 18:39:29,609 User submissions retrieved as <praw.models.listing.generator.ListingGenerator object at 0x7f77c8c28b00>
2017-12-15 18:39:29,609 Fetching: GET https://oauth.reddit.com/user/techminder/comments
2017-12-15 18:39:29,609 Data: None
2017-12-15 18:39:29,610 Params: {'sort': 'new', 'limit': 30, 'raw_json': 1}
2017-12-15 18:39:29,766 https://oauth.reddit.com:443 "GET /user/techminder/comments?sort=new&limit=30&raw_json=1 HTTP/1.1" 404 38
2017-12-15 18:39:29,768 Response: 404 (38 bytes)
2017-12-15 18:39:29,769 Error combining processed posts and comments for user techminder
Traceback (most recent call last):
File "/home/drew/Documents/subber/subber/reddit.py", line 170, in process_posts
for p in posts:
File "/usr/lib/python3.6/site-packages/praw/models/listing/generator.py", line 52, in __next__
self._next_batch()
File "/usr/lib/python3.6/site-packages/praw/models/listing/generator.py", line 62, in _next_batch
self._listing = self._reddit.get(self.url, params=self.params)
File "/usr/lib/python3.6/site-packages/praw/reddit.py", line 367, in get
data = self.request('GET', path, params=params)
File "/usr/lib/python3.6/site-packages/praw/reddit.py", line 472, in request
params=params)
File "/usr/lib/python3.6/site-packages/prawcore/sessions.py", line 179, in request
params=params, url=url)
File "/usr/lib/python3.6/site-packages/prawcore/sessions.py", line 124, in _request_with_retries
raise self.STATUS_EXCEPTIONS[response.status_code](response)
prawcore.exceptions.NotFound: received 404 HTTP response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/drew/Documents/subber/subber/reddit.py", line 196, in _get_active_subs
subs = process_posts(comments) + process_posts(submissions)
File "/home/drew/Documents/subber/subber/reddit.py", line 177, in process_posts
'{}'.format(user, p))
UnboundLocalError: local variable 'p' referenced before assignment
2017-12-15 18:39:29,770 Exception while getting user recommendations for user agom94
Traceback (most recent call last):
File "/home/drew/Documents/subber/subber/app.py", line 49, in on_get
recommendations = reddit.get_user_recommendations(session, user)
File "/home/drew/Documents/subber/subber/reddit.py", line 68, in get_user_recommendations
for sub in active_subs:
TypeError: 'NoneType' object is not iterable