← Back to team overview

mythbuntu-bugs team mailing list archive

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

 

Public bug reported:

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.

** Affects: mythbuntu
     Importance: Undecided
         Status: New


** Tags: trusty

-- 
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


Follow ups