Displayotron problems


#1

I’ve just added the DOT to my raspberry pi zero via a PHTA Stacker.

Upon trying to run the examples, i get the problem below.

Traceback (most recent call last):
File “./hello_world.py”, line 15, in
lcd.clear()
AttributeError: ‘module’ object has no attribute ‘clear’

I’ve read it could be a versioning issue, so i’ve updated OR it could be i2c issue but i’ve ensured it’s configured on but in addition, my envirophat works fine which uses i2c so surely that must be fine?

Any other suggestions?


#2

Curious! As far as I know, lcd.clear has been available in the library since it was created.

What do you see if you start a new Python REPL by running python on the command line, and then doing:

>>> import dot3k.lcd as lcd
>>> dir(lcd)

It could be a corrupt file, or something like that.

Also, I can’t imagine it happening with a submodule like dothat.lcd without throwing an import error outright, but check you don’t have any files alongside hello_world.py called dothat.py or lcd.py that Python could be importing instead of the installed library.


#3

I’n using the working examples in dothat directort as it’s the HAT so no files named things like ‘hello_world’, so i was expecting them to work. Following on from your request, it output this?

dir (lcd)
[‘builtins’, ‘doc’, ‘file’, ‘name’, ‘package’]

Any ideas?


#4

That looks quite spectacularly broken! Try sudo pip install --upgrade dot3k


#5

Says it’s up-to-date. Whats the easiest way to unistall the whole displayotron stuff installed through the curl command


#6

Try: sudo pip install --ignore-installed dot3k