← Back to team overview

mythbuntu-bugs team mailing list archive

[Bug 1737283] Re: AttributeError: 'module' object has no attribute 'disable_warnings'

 

It seems in fact that the above description is just the tip of the
iceberg and what really needs doing is to install newer versions of
dependent python packages as described here:

https://www.mythtv.org/wiki/TheTVDB_API_v2

under the "Ubuntu and Mythbuntu Trusty (14.04)" heading.

In fact all I really needed to update were python-{urllib3,requests} to
the Xenial versions of those packges, 1.13.1-2 and 2.9.1-3 respectively.

As easy as that is to do manually, once you discover that things are
indeed (pretty silently -- until you notice you are not getting metadata
any more) broken, it would be much nicer if upgrading these packages
happened when installing 0.29 on Trusty.  To that end, a simple backport
of those two packages from Xenial to Trusty in the Mythbuntu Trusty PPA
would be awesome.

-- 
You received this bug notification because you are a member of Mythbuntu
Bug Team, which is subscribed to Mythbuntu.
https://bugs.launchpad.net/bugs/1737283

Title:
  AttributeError: 'module' object has no attribute 'disable_warnings'

Status in Mythbuntu:
  New

Bug description:
  Using 0.29 on Trusty:

  $ /usr/share/mythtv/metadata/Television/ttvdb.py -v
  Traceback (most recent call last):
    File "/usr/share/mythtv/metadata/Television/ttvdb.py", line 1108, in <module>
      urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
  AttributeError: 'module' object has no attribute 'disable_warnings'

  Looks like urllib3 didn't get disable_warnings() until 1.22:
  https://github.com/shazow/urllib3/commit/8295b70dae76427b2c066eba4d08d0d0bf70860f

  Trusty only has 1.7.1 in it: https://packages.ubuntu.com/trusty/all
  /python-urllib3

  A patch to ttvdb.py along the lines of:

   
   # disable the insecure request warning that we know we are going to get
   import urllib3
  -urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
  +try:
  +    urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
  +except AttributeError:
  +    pass
   
   # Check that the lxml library is current enough
   # From the lxml documents it states: (http://codespeak.net/lxml/installation.html)

  Seems to take care of it.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mythbuntu/+bug/1737283/+subscriptions


References