-
-
Notifications
You must be signed in to change notification settings - Fork 191
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
Video won't play because of non-ascii character in title #637
Comments
|
As a further info, it's not only the accented characters that has troubles, but the single quote as well. These are some titles the plugin was not able to play:
The following instead did not have problems even without the "decode":
Actually, could it be just the single quote? I should find a title with an accented character but without the single quote and try what happens without the decode statement. I can looking for this case and let you know. |
The solution from @stefano-salari worked for me too. |
I tried to reproduce the issue every now and then, but I can't find any fault in the code or logic. I've tested playing videos with accented characters, single quotes, double quotes, just can't reproduce. |
Thanks @Varstahl, I'll try to revert my fix and reproduce the problem back, then I'll give you more info. |
I think that not many people report it because it happens only for people using Amazon prime and/or kodi in another language than English which are a minority. BTW you can try with James May our man in... season 2 ep 4. The title of this episode in French contains accented cars (Du très très bon fromage) that caused the error. I don't know if there was an update of the plugin lately because my playback.py file was reversed the old version without the @stefano-salari workaround. |
I'm trying to think about it, but I can't imagine anything not working. Everything is utf-8 decoded by default. All of my tests on French, Italian, Spanish concluded the same. So I'm starting to wonder: do you have any other addons/themes that might interfere with regular function? If you have just plain Kodi with the Amazon VOD addon, does it work? I've searched and tested far and wide, and I just can't repro. As for 2x4, the title's localized in italian so that wouldn't trigger. |
I'll check but as far as I remember, I didn't installed any theme. The only extension I use is the Youtube extension. I use LibreElec 9.2.8 on a Raspberry PI 4. Did you tried to locallse Amazon prime in French ? |
I checked recently and I found some extensions that I think are not part of the original distribution
I think I installed the first two extensions in order to migrate LibreElec from sd card to nvme drive. |
I have the same issue using plugin.video.amazon-test-0.9.7~beta+leia.zip while trying to watch The Last Of Us EP 5. The title in French is La survie à tout prix. I updated the line 451 of /storage/.kodi/addons/plugin.video.amazon-test/resources/lib/playback.py as explained by @stefano-salari and it fixed the issue |
Addon used
Account type
System Setup (please provide the following information):
Upload Logs
ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.UnicodeDecodeError'>
Error Contents: 'ascii' codec can't decode byte 0xc3 in position 22: ordinal not in range(128)
Traceback (most recent call last):
File "/storage/.kodi/addons/plugin.video.amazon-test/default.py", line 5, in
EntryPoint()
File "/storage/.kodi/addons/plugin.video.amazon-test/resources/lib/startup.py", line 70, in EntryPoint
PlayVideo(args.get('name', ''), args.get('asin'), args.get('adult', '0'), int(args.get('trailer', '0')), int(args.get('selbitrate', '0')))
File "/storage/.kodi/addons/plugin.video.amazon-test/resources/lib/playback.py", line 437, in PlayVideo
amazonUrl = g.BaseUrl + "/dp/" + (name if g.UsePrimeVideo else asin)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 22: ordinal not in range(128)
-->End of Python script error report<--
Describe the bug
The plugin can't play Amazon videos that contains Utf8 characters, such as "L'altro lato della metà". The error log refers to line 437 of file "/storage/.kodi/addons/plugin.video.amazon-test/resources/lib/playback.py":
I found the issue in the "name" variable and fixed it as follows:
Not an elegant solution but it worked, in my case. I wanted to share the issue with you, who can surely find a better approach to solve it.
Hope this could be useful, I'm available for any further info.
The text was updated successfully, but these errors were encountered: