bk1285 / rpi_wordclock

Software to create a Raspberry Pi based wordclock
GNU General Public License v3.0
214 stars 107 forks source link

no module named GTK #125

Closed smierd closed 5 years ago

smierd commented 5 years ago

New to python\raspberry pi's so sorry if this is a dumb question. I don't see anything in the instructions about a GTK module https://rpi-wordclock.readthedocs.io/en/master/

Traceback (most recent call last):
  File "/home/pi/rpi_wordclock2/wordclock.py", line 8, in <module>
    import wordclock_tools.wordclock_display as wcd
  File "/home/pi/rpi_wordclock2/wordclock_tools/wordclock_display.py", line 15, in <module>
    import wordclock_tools.wordclock_colors as wcc
  File "/home/pi/rpi_wordclock2/wordclock_tools/wordclock_colors.py", line 6, in <module>
    from GTKstrip import Color
  File "/home/pi/rpi_wordclock2/wordclock_tools/GTKstrip.py", line 3, in <module>
    import gtk
ImportError: No module named gtk

Some googling suggests running sudo apt-get install python-gtk2, which results in

Traceback (most recent call last):
  File "/home/pi/rpi_wordclock2/wordclock.py", line 166, in <module>
    word_clock = wordclock()
  File "/home/pi/rpi_wordclock2/wordclock.py", line 54, in __init__
    self.wcd = wcd.wordclock_display(self.config, self.wci)
  File "/home/pi/rpi_wordclock2/wordclock_tools/wordclock_display.py", line 58, in __init__
    self.strip.begin()
AttributeError: wordclock_display instance has no attribute 'strip'

Any advice?

smierd commented 5 years ago

Figured it out. Installing python-gtk2 was the correct move, my second error was related to not pulling my updated code which reflected the changes to the rpi_ws281x project.