Skip to content
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

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

Closed
damgot opened this issue Sep 28, 2018 · 18 comments · Fixed by #173
Closed

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

damgot opened this issue Sep 28, 2018 · 18 comments · Fixed by #173
Assignees
Labels

Comments

@damgot
Copy link

@damgot damgot commented Sep 28, 2018

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

@buzzzgeronimo

This comment has been minimized.

Copy link

@buzzzgeronimo buzzzgeronimo commented Sep 28, 2018

Hello,

I have exactly the same error

Ubuntu 18.04, kodi 18.0-BETA3

Thanks For help

@Varstahl

This comment has been minimized.

Copy link
Collaborator

@Varstahl Varstahl commented Sep 28, 2018

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

@damgot

This comment has been minimized.

Copy link
Author

@damgot damgot commented Sep 28, 2018

Thanks, I really appreciate your reactivity :)

@Varstahl

This comment has been minimized.

Copy link
Collaborator

@Varstahl Varstahl commented Sep 28, 2018

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 Varstahl self-assigned this Sep 28, 2018
@Varstahl Varstahl changed the title Amazon VOD plugin can not open folder. Amazon VOD – UI change in PrimeVideo.com broke the addon Sep 28, 2018
@damgot

This comment has been minimized.

Copy link
Author

@damgot damgot commented Sep 28, 2018

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.

@Varstahl

This comment has been minimized.

Copy link
Collaborator

@Varstahl Varstahl commented Sep 28, 2018

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

@Varstahl

This comment has been minimized.

Copy link
Collaborator

@Varstahl Varstahl commented Sep 29, 2018

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.

@damgot

This comment has been minimized.

Copy link
Author

@damgot damgot commented Sep 29, 2018

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

@Varstahl

This comment has been minimized.

Copy link
Collaborator

@Varstahl Varstahl commented Sep 29, 2018

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.

@damgot

This comment has been minimized.

Copy link
Author

@damgot damgot commented Sep 30, 2018

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.

@buzzzgeronimo

This comment has been minimized.

Copy link

@buzzzgeronimo buzzzgeronimo commented Sep 30, 2018

Big Thank you for your reactivity
your changes work perfectly.

@Varstahl

This comment has been minimized.

Copy link
Collaborator

@Varstahl Varstahl commented Oct 1, 2018

FUCKING HELL, Amazon just broke it again.

@Varstahl Varstahl reopened this Oct 1, 2018
@Varstahl

This comment has been minimized.

Copy link
Collaborator

@Varstahl Varstahl commented Oct 2, 2018

@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 57dcecd) 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.

@prinskarnatie

This comment has been minimized.

Copy link

@prinskarnatie prinskarnatie commented Oct 2, 2018

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

@damgot

This comment has been minimized.

Copy link
Author

@damgot damgot commented Oct 2, 2018

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

@Varstahl

This comment has been minimized.

Copy link
Collaborator

@Varstahl Varstahl commented Oct 3, 2018

0.5.8 released with 5f6b422, here's hoping.

@Varstahl Varstahl closed this Oct 3, 2018
@adruet29

This comment has been minimized.

Copy link

@adruet29 adruet29 commented Oct 4, 2018

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 !

@JayMonkey

This comment has been minimized.

Copy link

@JayMonkey JayMonkey commented Nov 3, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.