PM4K / PlexMod for Kodi (18, 19, 20, 21, 22+)

Good god. AttributeError: module 'collections' has no attribute 'Iterable'

The Iterable abstract class was removed from collections in Python 3.10. See the deprecation note in the 3.9 collections docs. In the section Removed of the 3.10 docs, the item

I guess you’re using 3.11.

Edit: Thanks **ELEC! :smiley:

That first one didn’t work unfortunately and the second one failed to install for some reason. Hopefully the logs that hbbs & ForKnox1337 have sent will help :crossed_fingers: I’ve rolled back to the previous beta in the meantime.

Killed beta16.3 and uploaded 16.4 instead.

0.7.9-beta16.4

4 Likes

Still happening for me when testing on Android tablet with 16.4. Assuming it’s just this bit of the log file that’s needed?

2024-07-31 16:32:45.513 T:27827   error <general>: _________________________________________________________________________________
2024-07-31 16:32:45.513 T:27827   error <general>: script.plex: ERROR: 
2024-07-31 16:32:45.513 T:27827   error <general>:     Traceback (most recent call last):
2024-07-31 16:32:45.513 T:27827   error <general>:       File "/storage/emulated/0/Android/data/net.kodinerds.maven.kodi21/files/.kodi/addons/script.plexmod/lib/player.py", line 1191, in _playVideo
2024-07-31 16:32:45.513 T:27827   error <general>:         self.playerObject.build()
2024-07-31 16:32:45.513 T:27827   error <general>:       File "/storage/emulated/0/Android/data/net.kodinerds.maven.kodi21/files/.kodi/addons/script.plexmod/lib/_included_packages/plexnet/plexplayer.py", line 84, in build
2024-07-31 16:32:45.513 T:27827   error <general>:         return self._build(directPlay, "playback_remux" in features)
2024-07-31 16:32:45.513 T:27827   error <general>:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-31 16:32:45.513 T:27827   error <general>:       File "/storage/emulated/0/Android/data/net.kodinerds.maven.kodi21/files/.kodi/addons/script.plexmod/lib/_included_packages/plexnet/plexplayer.py", line 195, in _build
2024-07-31 16:32:45.513 T:27827   error <general>:         util.LOG("Constructed video item for playback: {0}", util.cleanObjTokens(dict(obj)))
2024-07-31 16:32:45.513 T:27827   error <general>:                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-31 16:32:45.513 T:27827   error <general>:       File "/storage/emulated/0/Android/data/net.kodinerds.maven.kodi21/files/.kodi/addons/script.plexmod/lib/_included_packages/plexnet/util.py", line 209, in cleanObjTokens
2024-07-31 16:32:45.513 T:27827   error <general>:         elif isinstance(v, collections.Iterable):
2024-07-31 16:32:45.513 T:27827   error <general>:                            ^^^^^^^^^^^
2024-07-31 16:32:45.513 T:27827   error <general>:     NameError: name 'collections' is not defined
2024-07-31 16:32:45.513 T:27827   error <general>: _________________________________________________________________________________

Edit: info <general>: CAddonMgr::FindAddons: xbmc.python v3.0.2 installed

Is Kodi using quite an old build of python then if 3.11-3.13 is out?

Edit 2: Nervermind

"Kodi Python comes with all the standard modules from Python 3.8 or later. "

https://kodi.wiki/view/Python_libraries

Still getting the same error message. DM with log sent (hopefully I did everything right).

Same issue panni, see the screenshots

I’m an idiot. Currently on a walk, give me half an hour :slight_smile:

3 Likes

Massive layer 7 issue/PEBKAC fixed. Reuploaded zip.

3 Likes

Can confirm it’s working again now.

4 Likes

I confirm that now in coreelec it is no longer restarting the video player or going back to the beginning when changing the audio, the playback experience has improved a lot now, it is the same as the official plex. Congratulations panni and the people who helped!

3 Likes

Working as intended now. Thanks for the quick fix :clap:

1 Like

@panni

Hi.

I’ve successfully tested the latest re-uploaded beta.

It is playing as it should be with my 5.1 audio setup.

I haven’t changed a thing on my old settings. I left to Kodi to convert Opus/AAC to DD and to passthrough DTS and native AC3

I will test more later tonight and if something else occurs I’ll let you know.

Congratulations on your fantastic work revamping this addon UI/UX.

Regards

3 Likes

Working now. Thank you so much.

1 Like

0.7.9-beta16.5: script.plexmod.zip (2.8 MB)

Temporary Changelog:

  • Core: Add missing OPTIONS method to HttpRequest
  • SeekDialog/Player: Report selected streams correctly to PMS when switching streams in DirectPlay mode (activity/sessions tab in PlexWeb)
  • SeekDialog: Only apply automatic seek-back on pause when applicable (amount < current video position), otherwise the video restarts, as we seek into negative time
  • Settings: Set Seek back setting “Only with Direct Play” to default On (was Off)
  • Player: Properly honor previous paused state when switching streams during transcode session (now pausing onAVStarted instead of onPlayBackStarted)
4 Likes

Is there anything that can be done to prevent the need for a restart as per the message “Advancedsettings.xml modified
The advancedsettings.xml file has been modified. Please restart Kodi for the changes to apply.”?

I understand that this is due to the “Handle plex.direct mapping” setting and I could add plex.direct to my router’s DNS rebind exemption list, but this is not an option for my remote users whose routers are not configurable in this way.

Is plex.direct mapping something that used to happen silently in previous versions? I’ve only recently updated to 0.7.8, and this wasn’t an issue in 0.7.6 and earlier (or at least I wasn’t aware of it if it was).

Remote users don’t need that exception or any plex.direct handling. That’s only for the server owner to watch locally.

1 Like

Don’t know with which version it started. I’m using this one at the moment.

I have the following bug:

  • Pause the video
  • After the timeout that throws you back to movie page I start the movie again with the continue option
  • the video loads a moment and it switched to HDR etc. (Depending on video) but the UI keeps switching back to detail page and the video gets played in background. You can only hear the video.
  • using back stops the video in background
  • going further back to movie library etc. and staring the video again does not help - I need to reopen the addon / Kodi. Kodi freezes when closing it with a grey screen.

Thank you, that makes sense. One of my remote users set “Handle plex.direct mapping” to “Always” because they got a notification about plex.direct connections, which must be due to the fact they have their own server. Their own server is not often online, but they still get daily “Advancedsettings.xml modified” messages – so presumably the fact their account has a server registered to it is enough to trigger the issue regardless of whether the server is online.

Got a log for me?

Edit: It would also be nice to know when this started happening
Edit 2: Can’t reproduce, I need more details (I used the “Stop playback on idle after” setting)

We react to which connections we get from plex.tv/resources for the current account. If we haven’t seen a host and it’s a plex.direct one, we handle it. No idea why it would change that often, maybe due to a DSL connection that gets a new IP every 24 hours.

This is true for any server the user has access to. Regardless of whether it’s their own or it’s local or not.

If they don’t need it, they can just disable the functionality. Sounds like they don’t need it, if they only watch on remote servers. So maybe set it to never.

1 Like

Tried to get logs yesterday but after debug log activation I could not get it reproduced. Strange…