python-plexlibrary icon indicating copy to clipboard operation
python-plexlibrary copied to clipboard

AttributeError: 'MovieSection' object has no attribute 'ALLOWED_FILTERS'

Open PearsonFlyer opened this issue 4 years ago • 4 comments

I'm getting this error since the last PlexAPI update. I can't figure out how to solve it. It was not throwing an error prior to that. I have no playlists. Windows 10 install, Plex on the same box. Is this due to the new Plex movie agent being selected?

Traceback (most recent call last): File "c:\python38\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\python38\lib\runpy.py", line 87, in run_code exec(code, run_globals) File "c:\plexlibrary\plexlibrary_main.py", line 8, in main() File "c:\plexlibrary\plexlibrary\plexlibrary.py", line 67, in main r.run(sort_only=args.sort_only, share_playlist_to_all=args.everyone) File "c:\plexlibrary\plexlibrary\recipe.py", line 718, in run missing_items, list_count = self._run(share_playlist_to_all=share_playlist_to_all) File "c:\plexlibrary\plexlibrary\recipe.py", line 656, in _run source_libraries = self._get_plex_libraries() File "c:\plexlibrary\plexlibrary\recipe.py", line 125, in _get_plex_libraries if 'guid' not in source_library.ALLOWED_FILTERS: AttributeError: 'MovieSection' object has no attribute 'ALLOWED_FILTERS'

PearsonFlyer avatar Nov 20 '20 18:11 PearsonFlyer

Have you tried downgrading to a lower version of plexapi?

timmehtimtims avatar Nov 21 '20 03:11 timmehtimtims

@timmehtimtims that worked for me thanks! I used this cl pip install PlexAPI==4.1.2 as I'm still on legacy.

morganzero avatar Jan 23 '21 21:01 morganzero

Have you tried downgrading to a lower version of plexapi?

worked for me too! Thanks

chiggerz avatar Jan 25 '21 16:01 chiggerz

EDIT: I solved it, I needed to install libffi in order to install PlexAPI. working now.

======================

I'm running plex inside a container on linux, any idea how I can apply this fix?

# pip install PlexAPI==4.1.2
Collecting PlexAPI==4.1.2
  Downloading PlexAPI-4.1.2.tar.gz (91 kB)
     |████████████████████████████████| 91 kB 6.7 MB/s 
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-5c8z577p/plexapi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-5c8z577p/plexapi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-ctvegp4d
         cwd: /tmp/pip-install-5c8z577p/plexapi/
    Complete output (11 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/usr/lib64/python3.9/site-packages/setuptools/__init__.py", line 18, in <module>
        from setuptools.dist import Distribution
      File "/usr/lib64/python3.9/site-packages/setuptools/dist.py", line 32, in <module>
        from setuptools import windows_support
      File "/usr/lib64/python3.9/site-packages/setuptools/windows_support.py", line 2, in <module>
        import ctypes
      File "/usr/lib64/python3.9/ctypes/__init__.py", line 8, in <module>
        from _ctypes import Union, Structure, Array
    ImportError: libffi.so.7: cannot open shared object file: No such file or directory
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

enricosan avatar Feb 26 '21 03:02 enricosan