Pushbullet Notifications Failing (Ubuntu, v1.1.1 [33a7874])

Report & discuss bugs found in SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
zacharylm
Newbie
Newbie
Posts: 6
Joined: December 9th, 2016, 3:54 pm

Re: Pushbullet Notifications Failing (Ubuntu, v1.1.1 [33a787

Post by zacharylm »

Worked for me!
User avatar
jcfp
Release Testers
Release Testers
Posts: 1032
Joined: February 7th, 2008, 12:45 pm

Re: Pushbullet Notifications Failing (Ubuntu, v1.1.1 [33a787

Post by jcfp »

sander wrote:Good news: I got it working on my Ubuntu 14.04, both standalone and in SAB.
So the underlying problem is in urllib?
User avatar
sander
Release Testers
Release Testers
Posts: 9429
Joined: January 22nd, 2008, 2:22 pm

Re: Pushbullet Notifications Failing (Ubuntu, v1.1.1 [33a787

Post by sander »

jcfp wrote:
sander wrote:Good news: I got it working on my Ubuntu 14.04, both standalone and in SAB.
So the underlying problem is in urllib?
I believe in ssl.py ... there are monkey-patches to solve that.
And: all solved in python 2.7.9.


And on the other hand: "requests" seems to bring its own 'stack', which seems to be installed via pip, so outside python / ubuntu:

Code: Select all

/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/connection.py
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/request.py
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/response.py
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/retry.py
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/timeout.py
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/url.py
Oh, wait: http://packages.ubuntu.com/trusty/python-requests ... so also a ubuntu python package.
User avatar
sander
Release Testers
Release Testers
Posts: 9429
Joined: January 22nd, 2008, 2:22 pm

Re: Pushbullet Notifications Failing (Ubuntu, v1.1.1 [33a787

Post by sander »

Ouch: On a plain new Ubuntu 14.04 (in a docker container), even with "requests" I get "_ssl.c:510: EOF occurred in violation of protocol"

sudo docker run -it ubuntu:14.04 /bin/bash

apt-get update
apt-get upgrade
apt-get install python mlocate python-pip nano
pip install requests

Code: Select all

root@481d25f7ad4a:/# python -c "import requests ; res = requests.post('https://api.pushbullet.com/v2/pushes', data='', headers={}) " 
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/requests/api.py", line 88, in post
    return request('post', url, data=data, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/api.py", line 44, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 455, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 558, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 385, in send
    raise SSLError(e)
requests.exceptions.SSLError: [Errno 8] _ssl.c:510: EOF occurred in violation of protocol

So ... why does it work on my Ubuntu 14.04 on bare metal?
User avatar
jcfp
Release Testers
Release Testers
Posts: 1032
Joined: February 7th, 2008, 12:45 pm

Re: Pushbullet Notifications Failing (Ubuntu, v1.1.1 [33a787

Post by jcfp »

sander wrote:So ... why does it work on my Ubuntu 14.04 on bare metal?
In your latest traceback there's no mention of /usr/local, suggesting trusty's packaged python-request is in use rather than your pip-installed files. Maybe the python path handling is different in the docker install and/or for the root user?
User avatar
sander
Release Testers
Release Testers
Posts: 9429
Joined: January 22nd, 2008, 2:22 pm

Re: Pushbullet Notifications Failing (Ubuntu, v1.1.1 [33a787

Post by sander »

jcfp wrote:
sander wrote:So ... why does it work on my Ubuntu 14.04 on bare metal?
In your latest traceback there's no mention of /usr/local, suggesting trusty's packaged python-request is in use rather than your pip-installed files. Maybe the python path handling is different in the docker install and/or for the root user?
Ah, good suggestion.

And I just discovered installing python-pip also installs python-requests:

Code: Select all

# apt-get install -y python-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  python-requests
Recommended packages:
  python-dev-all
The following NEW packages will be installed:
  python-pip python-requests
... so that explains why the plain "requests" is also there, and not only the pip-requests. :-(
Post Reply