Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.14 KB | None | 0 0
  1. import praw
  2. r = praw.Reddit('Testing stuff for /r/LearnPython')
  3. for submission in r.get_subreddit('learnpython').get_new(limit=10):
  4.     print (submission.url)
  5.  
  6. ------------------------------------------------------------------
  7.  
  8.                 R E S U L T  I N  T E R M I N A L
  9.  
  10. kaliope:~/workspace $ python3 ex50/bin/app.py
  11. Traceback (most recent call last):
  12.   File "/usr/lib/python3.4/configparser.py", line 824, in items
  13.     d.update(self._sections[section])
  14. KeyError: 'Testing stuff for /r/LearnPython'
  15.  
  16. During handling of the above exception, another exception occurred:
  17.  
  18. Traceback (most recent call last):
  19.   File "ex50/bin/app.py", line 2, in <module>
  20.     r = praw.Reddit('Testing stuff for /r/LearnPython')
  21.   File "/usr/local/lib/python3.4/dist-packages/praw/reddit.py", line 103, in __init__
  22.     **config_settings)
  23.   File "/usr/local/lib/python3.4/dist-packages/praw/config.py", line 66, in __init__
  24.     self.custom = dict(Config.CONFIG.items(site_name), **settings)
  25.   File "/usr/lib/python3.4/configparser.py", line 827, in items
  26.     raise NoSectionError(section)
  27. configparser.NoSectionError: No section: 'Testing stuff for /r/LearnPython'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement