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

object has no attribute 'updateBackgroundFrom' #390

Open
1 of 2 tasks
ZsBT opened this issue Dec 10, 2023 · 2 comments
Open
1 of 2 tasks

object has no attribute 'updateBackgroundFrom' #390

ZsBT opened this issue Dec 10, 2023 · 2 comments

Comments

@ZsBT
Copy link

ZsBT commented Dec 10, 2023

Description:

BUG: AttributeError: 'PrePlayWindow' object has no attribute 'updateBackgroundFrom'

A couple of other Window classes drop the exception above.

Details:

  • Add-on version: 3
  • Kodi version: 19
  • OS Platform: debian bullseye
  • Hardware: RPI 4

Checklist

  • I have included a link to a log (or at the very least a link to a forum post with a log) from a session that had the issue
  • I have added appropriate GitHub labels
2023-12-10 21:04:49.214 T:1482928   ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'AttributeError'>
                                                   Error Contents: 'PrePlayWindow' object has no attribute 'updateBackgroundFrom'
                                                   Traceback (most recent call last):
                                                     File "/root/.kodi/addons/script.plexmod/lib/windows/kodigui.py", line 116, in onInit
                                                       else "ff000000"
                                                     File "/root/.kodi/addons/script.plexmod/lib/windows/preplay.py", line 105, in onReInit
                                                       self.refreshInfo(from_reinit=True)
                                                     File "/root/.kodi/addons/script.plexmod/lib/windows/preplay.py", line 113, in refreshInfo
                                                       self.setInfo(skip_bg=from_reinit and not (self.PLAY_BUTTON_ID <= oldFocusId <= self.MEDIA_BUTTON_ID))
                                                     File "/root/.kodi/addons/script.plexmod/lib/windows/preplay.py", line 509, in setInfo
                                                       self.updateBackgroundFrom(self.video)
                                                   AttributeError: 'PrePlayWindow' object has no attribute 'updateBackgroundFrom'
                                                   -->End of Python script error report<--
@ZsBT
Copy link
Author

ZsBT commented Dec 10, 2023

workaround patch:

--- a/lib/windows/windowutils.py
+++ b/lib/windows/windowutils.py
@@ -13,6 +13,9 @@ class UtilMixin():
     def __init__(self):
         self.exitCommand = None
 
+    def updateBackgroundFrom(self, obj):
+        return
+
     def goHome(self, section=None):
         HOME.show()
         if section:

@pannal
Copy link
Contributor

pannal commented May 12, 2024

You're in the wrong project. You're using my fork, PM4K. https://github.com/pannal/plex-for-kodi/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants