winsomehax / plugin.video.bitchute

Allow login and browsing of the bitchute website from within KODI
GNU General Public License v2.0
20 stars 2 forks source link

[KODI-19] RecursionError: maximum recursion depth exceeded #26

Closed mxraw closed 3 years ago

mxraw commented 3 years ago

Playing any video fails with

2021-01-21 19:43:50.025 T:1862    ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'RecursionError'>
                                                   Error Contents: maximum recursion depth exceeded
                                                   Traceback (most recent call last):
                                                     File "/storage/.kodi/addons/plugin.video.bitchute/main.py", line 4, in <module>
                                                       kodi_bitchute.plugin.run()
                                                     File "/storage/.kodi/addons/script.module.routing/lib/routing.py", line 130,
in run
                                                       self._dispatch(self.path)
                                                     File "/storage/.kodi/addons/script.module.routing/lib/routing.py", line 141,
in _dispatch
                                                       view_func(**kwargs)
                                                     File "/storage/.kodi/addons/plugin.video.bitchute/kodi_bitchute.py", line 67, in play_now
                                                       play_video(item_val)
                                                     File "/storage/.kodi/addons/plugin.video.bitchute/kodi_bitchute.py", line 291, in play_video
                                                       v = bitchute_access.get_video(video_id)
                                                     File "/storage/.kodi/addons/plugin.video.bitchute/bitchute_access.py", line 570, in get_video
                                                       return pickle.loads(data_cache.cacheFunction(_get_video, cookies, video_id))
                                                     File "/storage/.kodi/addons/script.common.plugin.cache/resources/lib/storage_server/StorageServer.py", line 623, in cacheFunction
                                                       ret_val = funct(*args)
                                                     File "/storage/.kodi/addons/plugin.video.bitchute/bitchute_access.py", line 449, in _get_video
                                                       return (pickle.dumps(video))
                                                   RecursionError: maximum recursion depth exceeded
                                                   -->End of Python script error report<--
winsomehax commented 3 years ago

Can you try the master branch. It is the same code with one change to add-on.xml:

The python entry is changed from 2.26.0 to 3.0.0

That is the only thing needed to make it run on Kodi 19

If not I will have to take a look at the weekend

On Thu, 21 Jan 2021, 19:47 cmF3, notifications@github.com wrote:

Playing any video fails with

2021-01-21 19:43:50.025 T:1862 ERROR : EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--

  • NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS! Error Type: <class 'RecursionError'> Error Contents: maximum recursion depth exceeded Traceback (most recent call last): File "/storage/.kodi/addons/plugin.video.bitchute/main.py", line 4, in kodi_bitchute.plugin.run() File "/storage/.kodi/addons/script.module.routing/lib/routing.py", line 130, in run self._dispatch(self.path) File "/storage/.kodi/addons/script.module.routing/lib/routing.py", line 141, in _dispatch view_func(*kwargs) File "/storage/.kodi/addons/plugin.video.bitchute/kodi_bitchute.py", line 67, in play_now play_video(item_val) File "/storage/.kodi/addons/plugin.video.bitchute/kodi_bitchute.py", line 291, in play_video v = bitchute_access.get_video(video_id) File "/storage/.kodi/addons/plugin.video.bitchute/bitchute_access.py", line 570, in get_video return pickle.loads(data_cache.cacheFunction(_get_video, cookies, video_id)) File "/storage/.kodi/addons/script.common.plugin.cache/resources/lib/storage_server/StorageServer.py", line 623, in cacheFunction ret_val = funct(args) File "/storage/.kodi/addons/plugin.video.bitchute/bitchute_access.py", line 449, in _get_video return (pickle.dumps(video)) RecursionError: maximum recursion depth exceeded -->End of Python script error report<--

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/winsomehax/plugin.video.bitchute/issues/26, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALDWQE2YZIZNUMNDHPYNEVDS3CAE5ANCNFSM4WNNHDKQ .

winsomehax commented 3 years ago

KODI19 has been updated. Can you download it and give it a try.

mxraw commented 3 years ago

Doesn't seem to change a thing, still throws the error above when trying to play a video.

winsomehax commented 3 years ago

Very strange. Python 3 fails on that 'pickle' call. Anyway... I've pushed a change to KODI 19. Can you try it and let me know if it works without and error now.

If it does I will synchronise with it the testing branch

winsomehax commented 3 years ago

BTW a quick tip with this... the Bitchute login is cached for 24 hours, and any data from bitchute is cached for 15 minutes. If you use a new version it's a good idea to wait 15 minutes before you test... as you can get strange errors otherwise and KODI's front-end architecture is really hard work to deal with.

To be honest, I'm building up a real dislike for Kodi. I'm sure the low-level stuff is great, but the user-interface and add-on stuff is hot garbage with an atrocious workflow (rant over!)

winsomehax commented 3 years ago

Can you give this a try now. It's to do with Python 3, unicode and pickle. I think it's sorted now and in a way that works pre and post KODI 19

mxraw commented 3 years ago

Sorry for the delay. Playing videos works now. Thanks!