Opened 22 months ago

Closed 22 months ago

Last modified 22 months ago

#13166 closed Bug Report - General (fixed)

exception within ttvdb.py

Reported by: warpme@… Owned by: David Hampton
Priority: minor Milestone: 29.1
Component: MythTV - Mythmetadatalookup Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Running ttvdb.py grabber gives me following error:

minimyth@FE-Livingroom:~ $ /usr/share/mythtv/metadata/Television/ttvdb.py -l pl -a US -C 70533
/usr/lib/python2.6/site-packages/MythTV/dataheap.py:71: DeprecationWarning: object.__new__() takes no parameters
  return super(Artwork, cls).__new__(cls, attr, parent, imagetype)
/usr/lib/python2.6/site-packages/cryptography-1.3.1-py2.6-linux-x86_64.egg/cryptography/__init__.py:26: DeprecationWarning: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of cryptography will drop support for Python 2.6
  DeprecationWarning
/usr/lib/python2.6/site-packages/urllib3-1.22-py2.6.egg/urllib3/contrib/pyopenssl.py:304: DeprecationWarning: unicode for buf is no longer accepted, use bytes
  return self.connection.send(data)
! Error: 'NoneType' object has no attribute 'keys'
Traceback (most recent call last):
  File "/usr/share/mythtv/metadata/Television/ttvdb.py", line 2464, in <module>
    sys.exit(main())
  File "/usr/share/mythtv/metadata/Television/ttvdb.py", line 2257, in main
    t._getShowData(series_season_ep[0], opts.language)
  File "/usr/lib/python2.6/site-packages/MythTV/ttvdb/tvdb_api.py", line 1068, in _getShowData
    self._parseBanners(sid)
  File "/usr/lib/python2.6/site-packages/MythTV/ttvdb/tvdb_api.py", line 957, in _parseBanners
    for cur_banner in bannersEt.keys():
AttributeError: 'NoneType' object has no attribute 'keys'

Test gives exactly the same results for 2 systems: MiniMyth2 with current master and ArchLinux? with current master.

Change History (3)

comment:1 Changed 22 months ago by David Hampton <mythtv@…>

Resolution: fixed
Status: newclosed

In 2f13b7e9761e5c9a666394bb1855ed343e8ecd3a/mythtv:

Check for an empty banner list before running it.

Add a None check before trying to get the keys from a hash.
Fixes #13166.

(cherry picked from commit 9d87dd9927a00766888ff6c165b431ab8e5b7c97)

comment:2 Changed 22 months ago by Stuart Auchterlonie

Milestone: needs_triage29.1
Owner: changed from JYA to David Hampton

comment:3 Changed 22 months ago by warpme@…

David, Milion thx for so quick fix!

Note: See TracTickets for help on using tickets.