Skip to content

Data disappears when interacting with object in iPython #591

Description

@fz6

Describe the issue
This sounds a bit crazy, and honestly I'm very puzzled as to what is going on. When interacting with an Episode object in ipython, attributes that previously returned data seem to become empty?

Code snipppets

In [4]: from plexapi.server import PlexServer In [5]: plex = PlexServer(baseurl, token)
In [7]: plex.sessions() Out[7]: [<Episode:redacted>]
In [8]: session = plex.sessions()[0] # Data is missing already, even though I can see it at API endpoint:
In [9]: session.transcodeSessions Out[9]: []
In [10]: session.players Out[10]: []
In [13]: plex.sessions()[0].players Out[13]: [<PlexClient:Chrome>]
In [14]: session = plex.sessions()[0] In [15]: session.players Out[15]: []
In [16]: session.transcodeSessions Out[16]: []
In [17]: plex.sessions()[0].transcodeSessions Out[17]: [<TranscodeSession:/transcode/sessions/>]
In [46]: session = plex.sessions()[0] In [47]: session.players Out[47]: [<PlexClient:Chrome>]
In [48]: session.sessionKey Out[48]: 3
In [49]: session.players Out[49]: [<PlexClient:Chrome>]
In [50]: session.players Out[50]: [<PlexClient:Chrome>]
In [51]: time.sleep(10) In [52]: session.players Out[52]: [<PlexClient:Chrome>]
In [53]: session.transcodeSessions Out[53]: [<TranscodeSession:/transcode/sessions/>]
In [54]: session.session Out[54]: [<Session:redacted>]
In [55]: session.session Out[55]: [<Session:redacted>]
In [56]: session.usernames Out[56]: ['redacted']
In [57]: session.session[0] ---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-57-44e16acbc0ce> in <module>
----> 1 session.session[0]
IndexError: list index out of range
In [58]: session.session Out[58]: []

Expected behavior
Data does not change on object when accessing attributes.

Enviroment (please complete the following information):

  • OS: Ubuntu 18.04.5
  • Plex version: 1.20.3.3483 (latest at time of writing)
  • Python Version:
  • PlexAPI version [e.g. 3.6.0]
$ python --version
Python 3.6.9
$ ipython --version
7.14.0
$ pip freeze | grep plex -i
PlexAPI==4.1.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions