xbmc icon indicating copy to clipboard operation
xbmc copied to clipboard

Amazon VOD – UI change in PrimeVideo.com broke the addon

Open damgot opened this issue 8 years ago • 18 comments

Hello, I've have LibreELEC-RPi2.arm-9.0-Milhouse-20180926033548-#0925-g1bed946 version with Kodi.

Everything is well installed and I can access Amazon VOD catalogue. But when I try to open the last level of folder (ex : movie/ drama) I 've an error.

Two days ago I was able to navigate in the catalogue and watch movies.

This is the log :

22:44:41.701 T:1558967152 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<-- - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS! Error Type: <type 'exceptions.AttributeError'> Error Contents: 'NoneType' object has no attribute 'group' 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 83, in EntryPoint g.pv.Browse(None if 'path' not in args else args['path']) File "/storage/.kodi/addons/plugin.video.amazon-test/resources/lib/primevideo.py", line 177, in Browse self._LazyLoad(node, nodeName) File "/storage/.kodi/addons/plugin.video.amazon-test/resources/lib/primevideo.py", line 441, in _LazyLoad results = re.search(r'<section\s+[^>]class="[^"]av-detail-section[^"]"[^>]>\s*(.?)\s

', cnt, flags=re.DOTALL).group(1) AttributeError: 'NoneType' object has no attribute 'group' -->End of Python script error report<-- 22:44:41.897 T:1558967152 WARNING: CPythonInvoker(3, /storage/.kodi/addons/plugin.video.amazon-test/default.py): the python script "/storage/.kodi/addons/plugin.video.amazon-test/default.py" has left several classes in memory that we couldn't clean up. The classes include: N9XBMCAddon7xbmcgui6DialogE,N9XBMCAddon9xbmcaddon5AddonE 22:44:41.909 T:1806316400 ERROR: GetDirectory - Error getting plugin://plugin.video.amazon-test/?mode=PrimeVideo_Browse&path=root-%2f%2f-Films-%2f%2f-Films%20romantiques 22:44:41.911 T:1938698256 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.amazon-test/?mode=PrimeVideo_Browse&path=root-%2f%2f-Films-%2f%2f-Films%20romantiques) failed 22:44:47.509 T:1558967152 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<-- - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS! Error Type: <type 'exceptions.AttributeError'> Error Contents: 'NoneType' object has no attribute 'group' 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 83, in EntryPoint g.pv.Browse(None if 'path' not in args else args['path']) File "/storage/.kodi/addons/plugin.video.amazon-test/resources/lib/primevideo.py", line 177, in Browse self._LazyLoad(node, nodeName) File "/storage/.kodi/addons/plugin.video.amazon-test/resources/lib/primevideo.py", line 441, in _LazyLoad results = re.search(r'<section\s+[^>]class="[^"]av-detail-section[^"]"[^>]>\s*(.?)\s', cnt, flags=re.DOTALL).group(1) AttributeError: 'NoneType' object has no attribute 'group' -->End of Python script error report<-- 22:44:47.633 T:1558967152 WARNING: CPythonInvoker(4, /storage/.kodi/addons/plugin.video.amazon-test/default.py): the python script "/storage/.kodi/addons/plugin.video.amazon-test/default.py" has left several classes in memory that we couldn't clean up. The classes include: N9XBMCAddon7xbmcgui6DialogE,N9XBMCAddon9xbmcaddon5AddonE 22:44:47.638 T:1806316400 ERROR: GetDirectory - Error getting plugin://plugin.video.amazon-test/?mode=PrimeVideo_Browse&path=root-%2f%2f-Films-%2f%2f-Films%20%e2%80%93%20Action%20et%20Aventure 22:44:47.640 T:1938698256 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.amazon-test/?mode=PrimeVideo_Browse&path=root-%2f%2f-Films-%2f%2f-Films%20%e2%80%93%20Action%20et%20Aventure) failed 22:44:52.517 T:1558967152 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<-- - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS! Error Type: <type 'exceptions.AttributeError'> Error Contents: 'NoneType' object has no attribute 'group' 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 83, in EntryPoint g.pv.Browse(None if 'path' not in args else args['path']) File "/storage/.kodi/addons/plugin.video.amazon-test/resources/lib/primevideo.py", line 177, in Browse self._LazyLoad(node, nodeName) File "/storage/.kodi/addons/plugin.video.amazon-test/resources/lib/primevideo.py", line 441, in _LazyLoad results = re.search(r'<section\s+[^>]class="[^"]av-detail-section[^"]"[^>]>\s*(.?)\s', cnt, flags=re.DOTALL).group(1) AttributeError: 'NoneType' object has no attribute 'group' -->End of Python script error report<-- 22:44:52.686 T:1558967152 WARNING: CPythonInvoker(5, /storage/.kodi/addons/plugin.video.amazon-test/default.py): the python script "/storage/.kodi/addons/plugin.video.amazon-test/default.py" has left several classes in memory that we couldn't clean up. The classes include: N9XBMCAddon9xbmcaddon5AddonE,N9XBMCAddon7xbmcgui6DialogE 22:44:52.701 T:1806316400 ERROR: GetDirectory - Error getting plugin://plugin.video.amazon-test/?mode=PrimeVideo_Browse&path=root-%2f%2f-Films-%2f%2f-Films%20%e2%80%93%20Action%20et%20Aventure 22:44:52.703 T:1938698256 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.amazon-test/?mode=PrimeVideo_Browse&path=root-%2f%2f-Films-%2f%2f-Films%20%e2%80%93%20Action%20et%20Aventure) failed 22:44:57.903 T:1558967152 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<-- - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS! Error Type: <type 'exceptions.AttributeError'> Error Contents: 'NoneType' object has no attribute 'group' 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 83, in EntryPoint g.pv.Browse(None if 'path' not in args else args['path']) File "/storage/.kodi/addons/plugin.video.amazon-test/resources/lib/primevideo.py", line 177, in Browse self._LazyLoad(node, nodeName) File "/storage/.kodi/addons/plugin.video.amazon-test/resources/lib/primevideo.py", line 441, in _LazyLoad results = re.search(r'<section\s+[^>]class="[^"]av-detail-section[^"]"[^>]>\s*(.?)\s', cnt, flags=re.DOTALL).group(1) AttributeError: 'NoneType' object has no attribute 'group' -->End of Python script error report<-- 22:44:58.029 T:1558967152 WARNING: CPythonInvoker(6, /storage/.kodi/addons/plugin.video.amazon-test/default.py): the python script "/storage/.kodi/addons/plugin.video.amazon-test/default.py" has left several classes in memory that we couldn't clean up. The classes include: N9XBMCAddon9xbmcaddon5AddonE,N9XBMCAddon7xbmcgui6DialogE 22:44:58.046 T:1806316400 ERROR: GetDirectory - Error getting plugin://plugin.video.amazon-test/?mode=PrimeVideo_Browse&path=root-%2f%2f-Films-%2f%2f-Films%20%e2%80%93%20Drames 22:44:58.047 T:1938698256 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.amazon-test/?mode=PrimeVideo_Browse&path=root-%2f%2f-Films-%2f%2f-Films%20%e2%80%93%20Drames) failed 22:45:02.238 T:1558967152 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<-- - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS! Error Type: <type 'exceptions.AttributeError'> Error Contents: 'NoneType' object has no attribute 'group' 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 83, in EntryPoint g.pv.Browse(None if 'path' not in args else args['path']) File "/storage/.kodi/addons/plugin.video.amazon-test/resources/lib/primevideo.py", line 177, in Browse self._LazyLoad(node, nodeName) File "/storage/.kodi/addons/plugin.video.amazon-test/resources/lib/primevideo.py", line 441, in _LazyLoad results = re.search(r'<section\s+[^>]class="[^"]av-detail-section[^"]"[^>]>\s*(.?)\s', cnt, flags=re.DOTALL).group(1) AttributeError: 'NoneType' object has no attribute 'group' -->End of Python script error report<-- 22:45:02.365 T:1558967152 WARNING: CPythonInvoker(7, /storage/.kodi/addons/plugin.video.amazon-test/default.py): the python script "/storage/.kodi/addons/plugin.video.amazon-test/default.py" has left several classes in memory that we couldn't clean up. The classes include: N9XBMCAddon7xbmcgui6DialogE,N9XBMCAddon9xbmcaddon5AddonE 22:45:02.376 T:1806316400 ERROR: GetDirectory - Error getting plugin://plugin.video.amazon-test/?mode=PrimeVideo_Browse&path=root-%2f%2f-Films-%2f%2f-Films%20%e2%80%93%20Enfants%20et%20Famille 22:45:02.378 T:1938698256 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.amazon-test/?mode=PrimeVideo_Browse&path=root-%2f%2f-Films-%2f%2f-Films%20%e2%80%93%20Enfants%20et%20Famille) failed 22:45:10.707 T:1558967152 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<-- - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS! Error Type: <type 'exceptions.AttributeError'> Error Contents: 'NoneType' object has no attribute 'group' 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 83, in EntryPoint g.pv.Browse(None if 'path' not in args else args['path']) File "/storage/.kodi/addons/plugin.video.amazon-test/resources/lib/primevideo.py", line 177, in Browse self._LazyLoad(node, nodeName) File "/storage/.kodi/addons/plugin.video.amazon-test/resources/lib/primevideo.py", line 441, in _LazyLoad results = re.search(r'<section\s+[^>]class="[^"]av-detail-section[^"]"[^>]>\s*(.?)\s', cnt, flags=re.DOTALL).group(1) AttributeError: 'NoneType' object has no attribute 'group' -->End of Python script error report<-- 22:45:10.832 T:1558967152 WARNING: CPythonInvoker(8, /storage/.kodi/addons/plugin.video.amazon-test/default.py): the python script "/storage/.kodi/addons/plugin.video.amazon-test/default.py" has left several classes in memory that we couldn't clean up. The classes include: N9XBMCAddon9xbmcaddon5AddonE,N9XBMCAddon7xbmcgui6DialogE 22:45:10.842 T:1806316400 ERROR: GetDirectory - Error getting plugin://plugin.video.amazon-test/?mode=PrimeVideo_Browse&path=root-%2f%2f-Films-%2f%2f-Films%20%e2%80%93%20Thrillers 22:45:10.845 T:1938698256 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.amazon-test/?mode=PrimeVideo_Browse&path=root-%2f%2f-Films-%2f%2f-Films%20%e2%80%93%20Thrillers) failed

Two days ago, everything worked well. Now I can not watch anything.

Thanks for help

damgot avatar Sep 28 '18 20:09 damgot

Hello,

I have exactly the same error

Ubuntu 18.04, kodi 18.0-BETA3

Thanks For help

buzzzgeronimo avatar Sep 28 '18 21:09 buzzzgeronimo

Hmm, that's very strange, that should never happen. I'll take a look at it.

Varstahl avatar Sep 28 '18 21:09 Varstahl

Thanks, I really appreciate your reactivity :)

damgot avatar Sep 28 '18 21:09 damgot

Well, fuck. New UI: everything changed and thus everything broke. I'll have to look into that but it's kinda late, so I'll have to use the weekend to find a fix for the issue, hopefully it's not too bad.

Thanks, I really appreciate your reactivity :)

When I can, I always try to look into issues asap, but it's not always possible. Like your previous issue with 2FA, I literally know nothing of that so I couldn't help.

Varstahl avatar Sep 28 '18 21:09 Varstahl

Thanks, I really appreciate your reactivity :)

When I can, I always try to look into issues asap, but it's not always possible. Like your previous issue with 2FA, I literally know nothing of that so I couldn't help.

If you spoke about "Can not sign in, Continuously have a Captcha #169", hum, please forget it. I closed it because I'm really confused. I entered my Amazon Prime password with my Kodi remote, and my amazon password is really complexe so I use my keepass... But keepass doesn't display any difference between a I (i uppercase) and a l (L lowercase)... So it was just a wrong password. But in the returned error message, "wrong code" message is only for bad captcha. For a wrong password, there is no special indication.

damgot avatar Sep 28 '18 22:09 damgot

I'll poke sandman on that, maybe there's a way to differentiate the errors.

Varstahl avatar Sep 28 '18 22:09 Varstahl

You can temporarily bandaid fix the issue by downloading primevideo.py from my repo and replace the one in your installations. The new UI update changed and broke quite a bit, I won't push an official update to the public until I'm confident that everything's fixed, but for the moment you can (theoretically) playback everything just fine.

Varstahl avatar Sep 29 '18 16:09 Varstahl

Hello Thanks it seems to work but it takes a very long long time to load catalog (almost 5 minutes to load comedy movie list on a Rpi 3+). Do you have a cache to not need to load all the catalog each time ?

Another things, I no longer have the movie description (synopsis).I only have the title and the thumbnail.

Thanks for your work

damgot avatar Sep 29 '18 20:09 damgot

Thanks it seems to work but it takes a very long long time to load catalog (almost 5 minutes to load comedy movie list on a Rpi 3+). Do you have a cache to not need to load all the catalog each time ?

There are 2 type of cache, most of the metadata for movies and series/episodes is perma-stored, and requires a lot of time, due to the way we must fetch data. Every time you load a category the first time, you're sending out about 40 requests per page, times the number of pages in the catalog. A fucking while.

The second type of cache is the catalog itself, and that's deleted on an arbitrary 11 hour base.

The second time through you should experience a lof of time saved, provided there aren't any new movies/series.

Another things, I no longer have the movie description (synopsis).I only have the title and the thumbnail.

A lot of stuff changed, and I rushed the first fix that allowed playback. Synopsis should now be correctly fixed as of last commit I pushed a few minutes ago.

Unless something went real bad, the functionalities are fully restored with the second commit I mentioned before. I want to push a few other fixes and QoL improvements before distributing the update though, so if you're so inclined you can re-update the primevideo.py from the same link I provided before.

Varstahl avatar Sep 29 '18 22:09 Varstahl

Thank you.

Synopsis was not really a problem for me but as I saw it I reported the bug. I will test the new primevideo.py and if I see something wrong I will tell you.

You did a really great job. You fixed it so faster, your reactivity is really appreciable. So many thanks for that.

damgot avatar Sep 30 '18 07:09 damgot

Big Thank you for your reactivity your changes work perfectly.

buzzzgeronimo avatar Sep 30 '18 12:09 buzzzgeronimo

FUCKING HELL, Amazon just broke it again.

Varstahl avatar Oct 01 '18 21:10 Varstahl

@damgot @buzzzgeronimo I might need a bit of help testing, if you're so inclined. Amazon pushed another update after my previous fix and everything broke again, so I spent the last 8 hours fixing a bit of everything.

The current primevideo.py (as of 57dcecda1d34526d131f13c374242fc3bddd0bce) should have all the fixes necessary plus some improvements. After an initial load you will probably notice a huge speed increase in loading times after some caching. Could you test it out and tell me if it's working for you guys? (At least until next Amazon's update, that is)

While in theory not necessary, if you start having weird errors you might need to manually purge the entire cache: the *.pvcp and *.pvdp inside userdata\addon_data\plugin.video.amazon-test. There have been so many changes I don't even know if it's necessary at this point.

Varstahl avatar Oct 02 '18 04:10 Varstahl

Hi @Varstahl, after that commit VOD is working correctly for me for Series and Movies. Just to confirm that I had to remove *.pvcp and *.pvdp. Tested with Kodi nightly on Ubuntu 18.04 and Windows 10 1804. Thanks

prinskarnatie avatar Oct 02 '18 07:10 prinskarnatie

Thanks Amazon... I will test it this evening (UTC+2) and give you my feedback. Thanks for your work

damgot avatar Oct 02 '18 07:10 damgot

0.5.8 released with 5f6b4229f41491578e2dc2cd9e989f378ce55690, here's hoping.

Varstahl avatar Oct 03 '18 20:10 Varstahl

Hello, just let you know that i had opened a duplicate for this issue (Kodi 18 librelec v8.90.005 ALPHA Amazon prime France not working (#176)), sorry about that. I can confirm that it is working for me watching French Amazon Prime, thanks a lot for the hard work !

adruet29 avatar Oct 04 '18 21:10 adruet29

Looks like the same issue has occurred again ...

Amazon VOD was working fine until about a week ago, no listings when using the plug-in. Account added and is logged in ok. The only thing that works is searching ... If search result is direct link then video plays, but if result is listing then no list is displayed.

Cheers Jay

JayMonkey avatar Nov 03 '19 15:11 JayMonkey