Skip to content
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

Unable to import on raspberry pi 3 #21

Open
jesseyofferenvan opened this issue Nov 11, 2017 · 3 comments
Open

Unable to import on raspberry pi 3 #21

jesseyofferenvan opened this issue Nov 11, 2017 · 3 comments

Comments

@jesseyofferenvan
Copy link

I got a freshly installed raspberry and I was trying to install this pushover script

Now I installed it over pip with:

$ pip install python-pushover

and created the following script

from pushover import Client

client = Client("myUserToken", 
api_token="myAppToken")
client.send_message("message!", title="myTitle")

And that results in the following response

python test.py

Traceback (most recent call last):

  File "test.py", line 1, in <module>

from pushover import Client

  File "/home/pi/Desktop/project/test.py", line 1, in <module>

from pushover import init, Client

ImportError: cannot import name init

My python version used : Python 2.7.13

@jesseyofferenvan
Copy link
Author

Just tried updating my python version to python 3.5 but this also has no success, also tried on my macbook with version 2.7.10 without success

@Thibauth
Copy link
Owner

Thibauth commented Dec 5, 2017

Thanks for the report. I won't have time to look into this in details until Christmas break, but can you try replacing the imports at the top of your script by:

import pushover
from pushover import Client

in particular, you should explicitly import pushover and not import init. Not sure it will help, just a shot in the dark...

@emailtoalex
Copy link

Hello,
I am quite confused, the setup was as following:
git clone https://github.com/Thibauth/python-pushover.git
cd python-pushover
pip install .

opening a python with your code:

from pushover import init, Client
init("")
Client("").send_message("Hello!", title="Hello")

Now I am getting the following error message. Any help would be appreciated.

Python 3.4.2 (default, Oct 19 2014, 13:31:11)
[GCC 4.9.1] on linux
Type "copyright", "credits" or "license()" for more information.

================================ RESTART ================================

Traceback (most recent call last):
File "/home/pi/pushover_test.py", line 1, in
import pushover
ImportError: No module named 'pushover'

Thanks a lot,
Alex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants