markop159 / KODI-Popcorn-Time

With KODI Popcorn Time you can search for movies that you can see immediately in KODI.
142 stars 32 forks source link

Crashing with "TypeError: show() takes exactly 2 arguments (1 given)" when selecting Movies option #94

Closed sorin-pop closed 6 years ago

sorin-pop commented 6 years ago

I am on a nightly LibreELEC+Kodi 18 build, and the Popcorn Time addon used to work fine until recently.

Now, when I open Popcorn Time addon, and select Movies, the UI displays "Unknown error has occured", and here is the full debug log: https://paste.kodi.tv/rokuzikomi

Please see if you can have a look and perhaps help. And let me know in case you need additional details.

Thank you for your time.

markop159 commented 6 years ago

Hi I do not have LibreELEC build to test it on, I tried addon on OSMC with Kodi 18 and it is working like expected. I am using fast_experimental build. You can try it you can create zip file yourself and install it.

Here is the code and readme on how to create zip file for installing. https://github.com/markop159/KODI-Popcorn-Time/tree/fast_experimental

sorin-pop commented 6 years ago

Thanks Mark, I'll try this out and let you know.

sorin-pop commented 6 years ago

Hi Mark, no luck with the fast experimental version either. The error seems to be the same, thrown in the same place:

10:53:19.786 T:1515766640 FATAL: [plugin.video.kodipopcorntime.beta] Traceback (most recent call last): File "/storage/.kodi/addons/plugin.video.kodipopcorntime.beta/addon.py", line 40, in <module> getattr(gui, params.pop('endpoint', 'index'))(params.pop('mediaType', '')).show(**params) TypeError: show() takes exactly 2 arguments (1 given)

Full new debug log: https://paste.kodi.tv/edoruxewak

Intructions for LibreElec:

I hope this helps you with possibly reproducing this yourself. But even if you can't or won't, perhaps you can say something based on the error itself and my logs? Any clue based on those?

markop159 commented 6 years ago

@sorin-pop, thanks for full debug log, I tried to install on my Windows machine latest nightly build of Kodi 18 and now I can reproduce error. I guess they changed something in latest nightly builds, will try to add some more logging to the addon and take some time to compare logs with working version of kodi and new not working version. I hope I can come up with some fix shortly.

sorin-pop commented 6 years ago

Thanks Mark, looking forward to your findings.

markop159 commented 6 years ago

OK I found the problem, couple of days ago, kodi team incorporated ReusePython function to speed up python scripts in addons, but unfortunately my addon crashes if this is enabled. Here you can read about this: https://github.com/xbmc/xbmc/pull/13814

To fix this, you just replace "addon.xml" file in "plugin.video.kodipopcorntime" or "plugin.video.kodipopcorntime.beta" depending on which version you are using with this one:

addon.xml

Do not build fast_experimental build because I somehow broken it, just replace addon.xml file. :)

sorin-pop commented 6 years ago

Hi Mark, thank you, this fixes it indeed. I am closing the ticket.