I've just upgraded my Kodi to the latest version 21.3 and switched from CV to PSE. If I run PSE using a sequence with Trivia in it, it will work once. Then if I run it a second time it Errors out saying "PreShow Experience Error. See the log for more information". If I "Reset content database" it usually fixes it but just re-breaks after working once. The error portion of the log is below. It seems related somehow to trivia because the issue goes away if I omit Trivia from my sequence. At first I thought it was my Trivia content itself but after experimenting with it, I don't think so. Any thoughts on how I can regain stability? Thanks in advance! Update: I might have fixed it. sequenceprocessor.py has import random defined twice. I removed the second one and it seems better now. 2026-05-08 23:17:04.243 T:14932 info <general>: Loading skin file: C:\Users\Daniel\AppData\Roaming\Kodi\addons\script.preshowexperience\resources\skins\Main\1080i\script.preshowexperience-experience.xml, load type: LOAD_ON_GUI_INIT
2026-05-08 23:17:04.838 T:6988 error <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'UnboundLocalError'>
Error Contents: local variable 'random' referenced before assignment
Traceback (most recent call last):
File "C:\Users\Daniel\AppData\Roaming\Kodi\addons\script.preshowexperience\addon.py", line 21, in <module>
player.begin(args=args)
File "C:\Users\Daniel\AppData\Roaming\Kodi\addons\script.preshowexperience\resources\lib\player.py", line 78, in begin
e.start(seqPath)
File "C:\Users\Daniel\AppData\Roaming\Kodi\addons\script.preshowexperience\resources\lib\experience.py", line 1336, in start
return self._start(sequence_path)
File "C:\Users\Daniel\AppData\Roaming\Kodi\addons\script.preshowexperience\resources\lib\experience.py", line 1356, in _start
self.processor.process()
File "C:\Users\Daniel\AppData\Roaming\Kodi\addons\script.preshowexperience\resources\lib\preshowexperience\sequenceprocessor.py", line 2417, in process
playables = handler(self, sItem)
File "C:\Users\Daniel\AppData\Roaming\Kodi\addons\script.preshowexperience\resources\lib\preshowexperience\sequenceprocessor.py", line 673, in __call__
for slides in self.getTriviaImages(sItem):
File "C:\Users\Daniel\AppData\Roaming\Kodi\addons\script.preshowexperience\resources\lib\preshowexperience\sequenceprocessor.py", line 969, in getTriviaImages
random.shuffle(pool)
UnboundLocalError: local variable 'random' referenced before assignment
-->End of Python script error report<--