Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jul 18th, 2013  |  syntax: None  |  size: 2.56 KB  |  views: 56  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. import praw
  2. r = praw.Reddit(user_agent='my_cool_application')
  3. submissions = r.get_subreddit('opensource').get_hot(limit=5)
  4. [str(x) for x in submissions]
  5.  
  6. script run to
  7.  
  8. Traceback (most recent call last):
  9.   File "[...]\GeographyFactBot_test.py", line 2, in <module>
  10.     r = praw.Reddit(user_agent='my_cool_application')
  11.   File "C:\Python33\lib\site-packages\praw\__init__.py", line 994, in __init__
  12.     super(AuthenticatedReddit, self).__init__(*args, **kwargs)
  13.   File "C:\Python33\lib\site-packages\praw\__init__.py", line 496, in __init__
  14.     super(OAuth2Reddit, self).__init__(*args, **kwargs)
  15.   File "C:\Python33\lib\site-packages\praw\__init__.py", line 612, in __init__
  16.     super(UnauthenticatedReddit, self).__init__(*args, **kwargs)
  17.   File "C:\Python33\lib\site-packages\praw\__init__.py", line 287, in __init__
  18.     update_check(__name__, __version__)
  19.   File "C:\Python33\lib\site-packages\update_checker.py", line 146, in update_check
  20.     result = checker.check(package_name, package_version, **extra_data)
  21.   File "C:\Python33\lib\site-packages\update_checker.py", line 54, in wrapped
  22.     retval = function(obj, package_name, package_version, **extra_data)
  23.   File "C:\Python33\lib\site-packages\update_checker.py", line 105, in check
  24.     headers=headers)
  25.   File "C:\Python33\lib\site-packages\requests\api.py", line 99, in put
  26.     return request('put', url, data=data, **kwargs)
  27.   File "C:\Python33\lib\site-packages\requests\api.py", line 44, in request
  28.     return session.request(method=method, url=url, **kwargs)
  29.   File "C:\Python33\lib\site-packages\requests\sessions.py", line 335, in request
  30.     resp = self.send(prep, **send_kwargs)
  31.   File "C:\Python33\lib\site-packages\requests\sessions.py", line 438, in send
  32.     r = adapter.send(request, **kwargs)
  33.   File "C:\Python33\lib\site-packages\requests\adapters.py", line 292, in send
  34.     timeout=timeout
  35.   File "C:\Python33\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 423, in urlopen
  36.     conn = self._get_conn(timeout=pool_timeout)
  37.   File "C:\Python33\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 238, in _get_conn
  38.     return conn or self._new_conn()
  39.   File "C:\Python33\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 205, in _new_conn
  40.     strict=self.strict)
  41.   File "C:\Python33\lib\http\client.py", line 737, in __init__
  42.     DeprecationWarning, 2)
  43.   File "C:\Python33\lib\idlelib\PyShell.py", line 60, in idle_showwarning
  44.     file.write(warnings.formatwarning(message, category, filename,
  45. AttributeError: 'NoneType' object has no attribute 'write'
clone this paste RAW Paste Data