Results 1 to 4 of 4

Thread: knew4v5 Fatal Python Error on OSX

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

    knew4v5 Fatal Python Error on OSX

    I decided to give the new client a quick whirl, and even after migrating all my settings it wouldn't launch. Here's the error I got in the log:

    Code:
    2019-04-06 16:36:43.205 T:123145568874496   DEBUG: Reading Settings.xml
    2019-04-06 16:36:43.217 T:123145568874496   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 41, in __init__
                                                    xbmc.log(os.uname())
                                                TypeError: argument 1 must be string, not tuple
    It looks like you're trying to log some uname information, but I think the log call on line 41 of XNEWA_Settings.py needs to be xbmc.log(os.uname()[4]) instead of xbmc.log(os.uname()) . When I changed it (or remarked out the log line), it works fine on OSX. Haven't tried with Windows or my OSMC boxes yet. That's up next.

  2. #2
    Join Date
    May 2006
    Location
    Canada
    Posts
    28,420
    Yes I probably changed 100s of print statements to xbmc.log statements and removed just as many so I was expecting these kind of errors The error is pretty clear not sure why it isn't tripping up in Windows.

    Martin

  3. #3
    Join Date
    May 2014
    Location
    Honolulu, HI
    Posts
    233
    Quote Originally Posted by mvallevand View Post
    Yes I probably changed 100s of print statements to xbmc.log statements and removed just as many so I was expecting these kind of errors The error is pretty clear not sure why it isn't tripping up in Windows.

    Martin
    I found this issue on python.org indicating that os.uname isn't supported on Windows.

    https://bugs.python.org/issue008080

    So the error isn't showing up on Windows because the test for the attributes existence fails. And the only time you're logging it right now is if the code uses os.uname(). The else statement in that test uses platform.uname() but doesn't try and log it.

  4. #4
    Join Date
    May 2006
    Location
    Canada
    Posts
    28,420
    Yes I saw that when I was fixing the code, I am just taking the log line out I never used it anyway the kodi.log has enough info for me.

    Martin

Posting Permissions

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