Results 1 to 5 of 5

Thread: knew4v5 2.6.1 Fatal Error on Windows and OSX When Loading

  1. #1
    Join Date
    May 2014
    Location
    Honolulu, HI
    Posts
    236

    knew4v5 2.6.1 Fatal Error on Windows and OSX When Loading

    OK, I don't know if you want all these in separate threads or just one big thread of testing problems, let me know. I just got 2.6.1 on my Windows machine, and it wasn't launching. Different error than my issue on OSX, so I downloaded 2.6.1 on my Mac, fixed the os.uname() thing, and got the same error I'm getting on my Windows machine.

    Code:
    2019-04-06 16:59:29.121 T:123145568337920   DEBUG: EXCEPTION: : Traceback (most recent call last):
                                                  File "/Users/pkscout/Library/Application Support/Kodi/addons/script.kodi.knew4v5/default.py", line 45, in <module>
                                                    my_settings = XNEWA_Settings()
                                                  File "/Users/pkscout/Library/Application Support/Kodi/addons/script.kodi.knew4v5/resources/src/XNEWA_Settings.py", line 54, in __init__
                                                    self.loadFromSettingsXML()
                                                  File "/Users/pkscout/Library/Application Support/Kodi/addons/script.kodi.knew4v5/resources/src/XNEWA_Settings.py", line 81, in loadFromSettingsXML
                                                    self.XNEWA_PREBUFFER = addon.getSetting("prebuffer") // 4
                                                TypeError: unsupported operand type(s) for //: 'str' and 'int'
    I fixed the error by changing lines 81 and 82 of XNEWA_Settings.py to read:

    Code:
            self.XNEWA_PREBUFFER = int(addon.getSetting("prebuffer")) // 4
            self.XNEWA_POSTBUFFER = int(addon.getSetting("postbuffer")) // 4
    I honestly don't know if that's the best way to handle that, but it is consistent with what you were doing with converting other settings to ints. If you keep generating errors this fast I won't ever get around to testing on OSMC. '-)

  2. #2
    Join Date
    May 2006
    Location
    Canada
    Posts
    28,886
    Ok got that, they were defined in settings.xml as int but I guess Kodi returns strings.

    2.6.3 is the last one for tonight's work thanks for the help.

    Martin

  3. #3
    Join Date
    May 2014
    Location
    Honolulu, HI
    Posts
    236
    Yup, Kodi has always (annoyingly) returned settings as strings. For Kodi 18 there are new python options for returning settings as specific types (ints and bools mostly), but if you use them then the addon isn't backward compatible with Kodi 17 or earlier. I know for my addons I'm going to wait to convert all my settings until I do an update that for some other reason is going to be v18+ only.

  4. #4
    Join Date
    May 2006
    Location
    Canada
    Posts
    28,886
    Yes one day when knew4v5 becomes just knew5 I will drop a lot of transition support for NextPVR and Kodi, that's why I need so much testing support.

    One of the modules I changed tonight was your fix_utf8.py file if you change it differently let me know.

    Martin

  5. #5
    Join Date
    May 2014
    Location
    Honolulu, HI
    Posts
    236
    I'll certainly let you know. Honestly I got most of that from Stack Overflow, so I'm not even 100% sure how it works. '-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •