richard-better / pushbullet.py

A python client for http://pushbullet.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ImportError: cannot import name 'Pushbullet'

harunresitc opened this issue · comments

I installed it with pip method to Raspberry but it gives an error.

My codes:

#!/usr/bin/env python

#https://github.com/randomchars/pushbullet.py

from pushbullet import Pushbullet

api_key="o.eVxdltA46bw3Xbd00Mst9MrtCgbE8al2"
pb = Pushbullet(api_key)

print(pb.devices)

How exactly did you install via pip? What python version are you running?

I've tried from a fresh vagrant using pip and it works no problems with the above code. So I am presuming that your installation via pip is not in a directory that python is searching for modules on.

Also, I would highly suggest removing your api_key from your post, you are giving people free access to use your account!

@harunresitc, as suggested by @simonporter007 delete you api key now!

Also no issues with installation via pip, also tried on a fresh docker image.

docker run -it --rm python:alpine /bin/sh
/ # pip install pushbullet.py
Collecting pushbullet.py
  Downloading https://files.pythonhosted.org/packages/72/91/78912bfb333f412be8f52bba4aa1c9b68d7f612e0fbc9fc5b88b4c894d26/pushbullet.py-0.11.0-py2.py3-none-any.whl
Collecting requests>=1.0.0 (from pushbullet.py)
...
/ # python
Python 3.7.0 (default, Aug  4 2018, 02:41:57) 
[GCC 6.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from pushbullet import Pushbullet
>>> api_key="justRemoveIt"