Dear,
After installing the python module, I receive the following error when executing the my script.
I'm getting the same error on Windows as on Debian.
from pushsafer import Client
ImportError: cannot import name Client
Any idea what is going wrong ?
sudo pip3 install python-pushsafer
Collecting python-pushsafer
Downloading https://www.piwheels.org/simple/python- ... ne-any.whl
Requirement already satisfied: requests>=1.0 in /usr/local/lib/python3.5/dist-packages (from python-pushsafer)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.5/dist-packages (from requests>=1.0->python-pushsafer)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.5/dist-packages (from requests>=1.0->python-pushsafer)
Requirement already satisfied: idna<2.8,>=2.5 in /usr/local/lib/python3.5/dist-packages (from requests>=1.0->python-pushsafer)
Requirement already satisfied: urllib3<1.24,>=1.21.1 in /usr/local/lib/python3.5/dist-packages (from requests>=1.0->python-pushsafer)
Installing collected packages: python-pushsafer
Successfully installed python-pushsafer-0.4
Python-pushsafer Client error during import
Re: Python-pushsafer Client error during import
works like charme, I just tested it!
You already installed the python-pushsafer package successfully.
Now create a file like pushsafer.py
Past the script:
Replace your private key and the other parameter to your needs! Save the modification!
Now run the script
You already installed the python-pushsafer package successfully.
Now create a file like pushsafer.py
Past the script:
Code: Select all
from pushsafer import init, Client
init("yourprivatekey")
Client("").send_message("Message", "Hello", "119", "1", "4", "2", "https://www.pushsafer.com", "Open Pushsafer", "0", "2", "60", "600", "1", "", "", "")
Now run the script
DE: Dir gefällt Service und Support! Dann freuen wir uns auf deine Bewertung!
EN: You like Service and Support! Then we look forward to your review!
Pushsafer.com Website - iOS - Android - Windows 10
EN: You like Service and Support! Then we look forward to your review!
Pushsafer.com Website - iOS - Android - Windows 10
Re: Python-pushsafer Client error during import
try to use absolute paths, like discribed here
https://www.pythoncentral.io/execute-py ... ile-shell/
https://www.pythoncentral.io/execute-py ... ile-shell/
DE: Dir gefällt Service und Support! Dann freuen wir uns auf deine Bewertung!
EN: You like Service and Support! Then we look forward to your review!
Pushsafer.com Website - iOS - Android - Windows 10
EN: You like Service and Support! Then we look forward to your review!
Pushsafer.com Website - iOS - Android - Windows 10
Re: Python-pushsafer Client error during import
Strange as I receive the error when it tries to execute the first line in the script: from pushsafer import init, Client
Did you test it also on Python version 3.5 or higher?
Did you test it also on Python version 3.5 or higher?
Re: Python-pushsafer Client error during import
Hello, I just did a test again on PythonAnywhere with copy/paste of your code. I just changed the key of course.
Again the installation was succesful but the scripts gives the same error on python 2.5 and 3.7.
I've no idea what I'm missing
10:51 ~ $ cat pushsafer.py
from pushsafer import init, Client
init("?????????????")
Client("").send_message("Message", "Hello", "119", "1", "4", "2", "https://www.pushsafer.com", "Open Pushsafer", "0", "2", "60", "600", "1", "", "", "")
10:51 ~ $ python2 --version
Python 2.7.12
10:51 ~ $ python2 pushsafer.py
Traceback (most recent call last):
File "pushsafer.py", line 1, in <module>
from pushsafer import init, Client
File "/home/skezie/pushsafer.py", line 1, in <module>
from pushsafer import init, Client
ImportError: cannot import name init
10:51 ~ $ python3 --version
Python 3.7.0
10:51 ~ $ python2 pushsafer.py
Traceback (most recent call last):
File "pushsafer.py", line 1, in <module>
from pushsafer import init, Client
File "/home/skezie/pushsafer.py", line 1, in <module>
from pushsafer import init, Client
ImportError: cannot import name init
Again the installation was succesful but the scripts gives the same error on python 2.5 and 3.7.
I've no idea what I'm missing
10:51 ~ $ cat pushsafer.py
from pushsafer import init, Client
init("?????????????")
Client("").send_message("Message", "Hello", "119", "1", "4", "2", "https://www.pushsafer.com", "Open Pushsafer", "0", "2", "60", "600", "1", "", "", "")
10:51 ~ $ python2 --version
Python 2.7.12
10:51 ~ $ python2 pushsafer.py
Traceback (most recent call last):
File "pushsafer.py", line 1, in <module>
from pushsafer import init, Client
File "/home/skezie/pushsafer.py", line 1, in <module>
from pushsafer import init, Client
ImportError: cannot import name init
10:51 ~ $ python3 --version
Python 3.7.0
10:51 ~ $ python2 pushsafer.py
Traceback (most recent call last):
File "pushsafer.py", line 1, in <module>
from pushsafer import init, Client
File "/home/skezie/pushsafer.py", line 1, in <module>
from pushsafer import init, Client
ImportError: cannot import name init
Re: Python-pushsafer Client error during import
yes, tested with version 3.6
Please try to get help in a pyton board, iam not a python developer!
Kevin
Please try to get help in a pyton board, iam not a python developer!
Kevin
DE: Dir gefällt Service und Support! Dann freuen wir uns auf deine Bewertung!
EN: You like Service and Support! Then we look forward to your review!
Pushsafer.com Website - iOS - Android - Windows 10
EN: You like Service and Support! Then we look forward to your review!
Pushsafer.com Website - iOS - Android - Windows 10
Who is online
Users browsing this forum: No registered users and 2 guests