matthewbauer / reddwall

Change your background to a random wallpaper on Reddit.
MIT License
21 stars 6 forks source link

Reddwall not working on Ubuntu 14.04 #9

Open malteseunderdog opened 8 years ago

malteseunderdog commented 8 years ago
usr@machine:/opt/reddwall$ ./reddwall.py 
Traceback (most recent call last):
  File "./reddwall.py", line 12, in <module>
    r = praw.Reddit(user_agent='mac:org.bauer.reddwall:v1.0.0 (by /u/mjbauer95)')
  File "/usr/local/lib/python2.7/dist-packages/praw-4.0.0b4-py2.7.egg/praw/reddit.py", line 92, in __init__
    raise ClientException(message.format(attribute))
praw.exceptions.ClientException: Required configuration setting 'client_id' missing. 
This setting can be provided in a praw.ini file, as a keyword argument to the `Reddit` class constructor, or as an environment variable.

This is easily fixed by adding some bogus params to the constructor call (12):

r = praw.Reddit(user_agent='mac:org.bauer.reddwall:v1.0.0 (by /u/mjbauer95)',client_id='xx', client_secret='xx')

But then a next error (with hang) looks like:

usr@machine:/opt/reddwall$ ./reddwall.py 
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "./reddwall.py", line 207, in Init
    self.GetSubmissions()
  File "./reddwall.py", line 217, in GetSubmissions
    subreddit = r.get_subreddit(self.settings['subreddit'])
AttributeError: 'Reddit' object has no attribute 'get_subreddit'

Which I have no clue how to resolve... can you help please?

matthewbauer commented 8 years ago

It looks like praw might have changed their API in the latest release. I've been using the 3.4.0 version. I'll look into what could be causing it.

Try installing the older praw to see what happens:

pip install 'praw==3.4.0' --force-reinstall
malteseunderdog commented 8 years ago

Something happens... but I get no app in the status bar (perhaps because Ubuntu uses unity?). How do I change the frequency of updates?

Also I get this when I run reddwall.py

Version 3.4.0 of praw is outdated. Version 4.0.0b4 was released Friday March 25, 2016.
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:315: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning