Open Manyone1 opened 4 years ago
@mediaminister This one is up your alley :wink:
Most likely the arguments in argv
are not decoded to unicode in the run
function. Converting the incoming arguments to unicode should fix this problem:
for i, arg in enumerate(argv):
argv[i] = to_unicode(arg)
@mediaminister I guess that the calling add-on is not using unicode_literals while this add-on now does.
~@Manyone1 I guess we need to discuss this with the missingmovies add-on author to discuss the best way forward. I expect this add-on not to be ready for Python 3 either.~
I guess that the calling add-on is not using unicode_literals while this add-on now does.
The problem with the routing add-on is that sys.argv
doesn't support unicode strings in Python2, so this is always treated as ASCII. You have to decode the arguments that are passed through sys
in Python2 to unicode.
But if you import unicode_literals from future, any string in Python2 is considered unicode.
I would be surprised if sys.argv
would be excluded from being a unicode literal. But it appears you are right (again!). It appears a list of standard libraries do not use unicode literals by default :disappointed:
[dag@moria ~]$ python2 -c 'import sys; print type(sys.argv[1])' föobàr
<type 'str'>
[dag@moria ~]$ python2 -c 'from __future__ import unicode_literals; import sys; print type(sys.argv[1])' föobàr
<type 'str'>
I will make a PR for this.
@Manyone1 Can you try the following fix by installing this ZIP file: https://github.com/dagwieers/kodi-plugin-routing/archive/argv-unicode.zip
It should provide you with a working v0.2.3 release and should be a good workaround until an update is released. Please report back!
doesnt work, back on 0.2.1
@Manyone1 Can you share a log when using this version? It may fail for another reason...
I can confirm with my tests that we did fix the unicode_literals problem with sys.argv that could lead to the errors you see.
the problem occurs when i use the addon missingmovies to find new movies on disk. it is only on folders with german characters like äÄöÖüÜß with v.0.2.1 ther are no problems but with v0.2.3 there comes up an error. I tried the 0.2.2 to, by manual installation, so i dont know if it is a reference, but the same error as in 0.2.3 comes up. error_missingmovies.txt