Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed TypeError that crashes the addon #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Nov 16, 2016

  1. Fixed TypeError that crashes the addon

    The latest Version of the Addon crashes every time you try to get any videodata. This change prevents the addon from crashing.
    I guess the 4Players api changed and returns other types.
    
    Kodi.log callstack for further information:
    "
    ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                 - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                Error Type: <type 'exceptions.TypeError'>
                                                Error Contents: unsupported operand type(s) for /: 'unicode' and 'int'
                                                Traceback (most recent call last):
                                                  File "C:\Users\...\AppData\Roaming\Kodi\addons\plugin.video.4players\addon.py", line 210, in <module>
                                                    plugin.run()
                                                  File "C:\Users\...\AppData\Roaming\Kodi\addons\script.module.xbmcswift2\lib\xbmcswift2\plugin.py", line 332, in run
                                                    items = self._dispatch(self.request.path)
                                                  File "C:\Users\...\AppData\Roaming\Kodi\addons\script.module.xbmcswift2\lib\xbmcswift2\plugin.py", line 306, in _dispatch
                                                    listitems = view_func(**items)
                                                  File "C:\Users\...\AppData\Roaming\Kodi\addons\plugin.video.4players\addon.py", line 65, in latest_videos
                                                    items = __format_videos(videos)
                                                  File "C:\Users\...\AppData\Roaming\Kodi\addons\plugin.video.4players\addon.py", line 166, in __format_videos
                                                    } for i, video in enumerate(videos)]
                                                TypeError: unsupported operand type(s) for /: 'unicode' and 'int'
                                                -->End of Python script error report<--
    "
    1337Boby committed Nov 16, 2016
    Configuration menu
    Copy the full SHA
    9c5d3b0 View commit details
    Browse the repository at this point in the history