You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeError: argument "entry1" for method "setArtists" must be unicode or str
Expected Behavior
Here is a clear and concise description of what was expected to happen:
The method should expect a tuple or list as per the documentation.
Possible the documentation is incorrect but my initial assumption is that it would be expected to function the same as other similar methods such as setStudios or setDirectors. Additionally, the original setInfo() method accepted a list.
Actual Behavior
The method expects a string and raises a TypeError when given a list as per the documentation
Here are some links or screenshots to help explain the problem:
Additional context or screenshots (if appropriate)
Here is some additional context or explanation that might help:
Your Environment
Used Operating system:
Android
iOS
tvOS
Linux
macOS
Windows
Windows UWP
Operating system version/name: Win 11
Kodi version: Nexus
note: Once the issue is made we require you to update it with new information or Kodi versions should that be required.
Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.
The text was updated successfully, but these errors were encountered:
The code looks correct to me: https://github.com/xbmc/xbmc/blob/master/xbmc/interfaces/legacy/InfoTagVideo.h#L2518
It expects a list or tuple of str or unicode. I also compared it to other methods like setTags() and they look exactly the same. I even checked the generated code which takes care of actually parsing the Python objects into C++ and it also looks correct and identical to the one for setTags().
If you neither pass a list nor a tuple to setArtists() you will get the following error message:
The parameter "artists" must be either a Tuple or a List.
This doesn't match with your error message. Your error message is displayed if one of the list / tuple elements is neither a str nor a unicode object. So it looks like something is wrong with the type of the elements you pass to setArtists().
Bizarelly can't reproduce the issue this morning. Even with my very rudimentary C++ understanding those methods look correct so must've been an issue on my end.
Struggling to figure out what might've been the cause. I was reliably able to recreate yesterday with dummy metadata as a test case. My code looks right and is working how I'd expect it to now with the same test case as yesterday. Looking at it for the last half an hour and only explanation I can think of is that I stumbled into some unusual reuselanguageinvoker behaviour.
Anyway, sorry for wasting your time looking into this.
Bug report
Describe the bug
Here is a clear and concise description of what the problem is:
The setArtists() method of InfoTagVideo expects a string despite being documented as expecting a list.
https://alwinesch.github.io/group__python___info_tag_video.html#gad35ce83f3d549079099e31d812735c31
It raises a TypeError when given a list
Expected Behavior
Here is a clear and concise description of what was expected to happen:
The method should expect a tuple or list as per the documentation.
Possible the documentation is incorrect but my initial assumption is that it would be expected to function the same as other similar methods such as setStudios or setDirectors. Additionally, the original setInfo() method accepted a list.
Actual Behavior
The method expects a string and raises a TypeError when given a list as per the documentation
Possible Fix
To Reproduce
Steps to reproduce the behavior:
info_tag.setArtists(['Artist1', 'Artist2'])
Debuglog
The debuglog can be found here:
https://paste.kodi.tv/evefezexaf.kodi
Screenshots
Here are some links or screenshots to help explain the problem:
Additional context or screenshots (if appropriate)
Here is some additional context or explanation that might help:
Your Environment
Used Operating system:
Android
iOS
tvOS
Linux
macOS
Windows
Windows UWP
Operating system version/name: Win 11
Kodi version: Nexus
note: Once the issue is made we require you to update it with new information or Kodi versions should that be required.
Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.
The text was updated successfully, but these errors were encountered: