PeetjeT
Posts: 2
Joined: Fri Nov 20, 2015 12:48 pm

Import error Sense_Hat

Wed Nov 25, 2015 11:53 am

Hello,
I am running a Sense-Hat and trying to wrire new software for it.
All was working fine until, all of a sudden i get the following error message on Traceback on any simple program i try to run using Python3.2.
I have tried to re-install sense hat and uninstall pillow but i cannot fiind the right command to unistall it.
The programs do run on the command line however so the Sense Hat is being recognized.

Traceback (most recent call last):
File "/home/pi/rainbow.py", line 1, in <module>
from sense_hat import SenseHat
File "/usr/lib/python3/dist-packages/sense_hat/__init__.py", line 2, in <module>
from .sense_hat import SenseHat, SenseHat as AstroPi
File "/usr/lib/python3/dist-packages/sense_hat/sense_hat.py", line 14, in <module>
from PIL import Image # pillow
File "/usr/local/lib/python3.2/dist-packages/PIL/Image.py", line 31, in <module>
import logging
File "/home/pi/logging.py", line 5, in <module>
from sense_hat import SenseHat
ImportError: cannot import name SenseHat

ozmule
Posts: 3
Joined: Sat Jan 30, 2016 11:08 pm

Re: Import error Sense_Hat

Sun Feb 07, 2016 9:24 am

I'm having the same issue. Did you manage to resolve this?

It was working no issues then poof not working any longer. At a loss to understand what the problem could be.

CharlieT
Posts: 1
Joined: Fri Mar 18, 2016 2:27 am

Re: Import error Sense_Hat

Fri Mar 18, 2016 3:00 am

ozmule wrote:I'm having the same issue. Did you manage to resolve this?

It was working no issues then poof not working any longer. At a loss to understand what the problem could be.
I hope you see this, since it's so much later, but I had something very similar to this happen to me. In my case, I was going to set up a thing to display two digits on the LED matrix. So I set up a Python script called "numbers.py". And started getting errors. Even old scripts that used to work.

Somehow, after much trial and error (I'm still very much a newbie with Python), I managed to figure out that it was the "numbers.py" script. Once I deleted that, my other scripts started working again...

Return to “Troubleshooting”