-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keep getting import errors #40
Comments
Have you run, and has it completed successfully, the install of python-dbus
and bluedot:
sudo apt-get install python3-dbus
sudo pip3 install bluedot
Are you running a recent version of Raspbian with pixel? Previous versions
of Raspbian didn't include the bluetooth libraries.
On 12 Apr 2017 16:59, "erikvanelten" <notifications@github.com> wrote:
Tried it on a headless Pi Zero W and on a Pi 3B 1.2, with both Python 2.7.9
and Python 3.4.2 but every time I get the following when I try to run the
first bit of code:
Traceback (most recent call last):
File "bluedot.py", line 1, in
from bluedot import BlueDot
File "/home/pi/bluedot/bluedot.py", line 1, in
from bluedot import BlueDot
ImportError: cannot import name BlueDot
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#40>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACOLneuhhQrezJiqzqKnXBzP9d272haIks5rvOa5gaJpZM4M7jBU>
.
|
I see the problem....
You have called your program bluedot.py...
Now when you:
import bluedot
.. it's importing your bluedot.py program not the bluedot module as Python
looks in the local directory for a file called bluedot before looking in
the installed packages.
Rename your program and delete all the pycache & *.pyc directories and
files.
On 12 Apr 2017 16:59, "erikvanelten" <notifications@github.com> wrote:
Tried it on a headless Pi Zero W and on a Pi 3B 1.2, with both Python 2.7.9
and Python 3.4.2 but every time I get the following when I try to run the
first bit of code:
Traceback (most recent call last):
File "bluedot.py", line 1, in
from bluedot import BlueDot
File "/home/pi/bluedot/bluedot.py", line 1, in
from bluedot import BlueDot
ImportError: cannot import name BlueDot
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#40>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACOLneuhhQrezJiqzqKnXBzP9d272haIks5rvOa5gaJpZM4M7jBU>
.
|
Put a note into the getting started instructions about not calling your program bluedot. |
Updated getting started guide. |
Martin,
Thanks for the quick reply!
Let's call this a beginner's error, but to be honest I think this is strange Python behaviour.
But this did the trick. Once, in fact. The BT connection was lost immediately, but that's probably due to the wobbly BT-connection with my Nexus 5.
Anyway: solved!!
Cheers,
Erik
…________________________________
From: martinohanlon <notifications@github.com>
Sent: Wednesday, April 12, 2017 3:20 PM
To: martinohanlon/BlueDot
Cc: erikvanelten; Author
Subject: Re: [martinohanlon/BlueDot] Keep getting import errors (#40)
I see the problem....
You have called your program bluedot.py...
Now when you:
import bluedot
.. it's importing your bluedot.py program not the bluedot module as Python
looks in the local directory for a file called bluedot before looking in
the installed packages.
Rename your program and delete all the pycache & *.pyc directories and
files.
On 12 Apr 2017 16:59, "erikvanelten" <notifications@github.com> wrote:
Tried it on a headless Pi Zero W and on a Pi 3B 1.2, with both Python 2.7.9
and Python 3.4.2 but every time I get the following when I try to run the
first bit of code:
Traceback (most recent call last):
File "bluedot.py", line 1, in
from bluedot import BlueDot
File "/home/pi/bluedot/bluedot.py", line 1, in
from bluedot import BlueDot
ImportError: cannot import name BlueDot
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#40>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACOLneuhhQrezJiqzqKnXBzP9d272haIks5rvOa5gaJpZM4M7jBU>
.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#40 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AKc8XP4m5nMT7jTX1hxkaIz5pbx4Qzdxks5rvOujgaJpZM4M7jBU>.
|
I am having the same issue as above, "ImportError: No module named bluedot" I followed the steps but get the same error on both a zero w and Pi3 pi@raspberrypiFULL: |
You installed BlueDot for python 3 but you are running your program with python 2. Change python MyDot.py To python3 MyDot.py |
Tried it on a headless Pi Zero W and on a Pi 3B 1.2, with both Python 2.7.9 and Python 3.4.2 but every time I get the following when I try to run the first bit of code:
Traceback (most recent call last):
File "bluedot.py", line 1, in
from bluedot import BlueDot
File "/home/pi/bluedot/bluedot.py", line 1, in
from bluedot import BlueDot
ImportError: cannot import name BlueDot
The text was updated successfully, but these errors were encountered: