python-plexlibrary
python-plexlibrary copied to clipboard
int is not iterable
Running movies_trending for the first time.
Creating symlinks for 192 matching items in the library...
Unable to create the new library folder '/mnt/user/Plex\ Media/Movies/Trending/'.
Exiting script.
Traceback (most recent call last):
File "/usr/lib64/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "plexlibrary/__main__.py", line 3, in <module>
main()
File "plexlibrary/plexlibrary.py", line 61, in main
r.run(args.sort_only)
File "plexlibrary/recipe.py", line 690, in run
missing_items, list_count = self._run()
TypeError: 'int' object is not iterable
Unable to create the new library folder '/mnt/user/Plex\ Media/Movies/Trending/'.
Does the script have write permissions on that directory? Could you try creating it manually first?
So this is if I run the script with python3. If I run it with python, it throws
Traceback (most recent call last):
File "/usr/lib64/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/mnt/user/Storage/Bots/python-plexlibrary/plexlibrary/__main__.py", line 3, in <module>
main()
File "plexlibrary/plexlibrary.py", line 61, in main
r.run(args.sort_only)
File "plexlibrary/recipe.py", line 690, in run
missing_items, list_count = self._run()
File "plexlibrary/recipe.py", line 87, in _run
item_list = self.weighted_sorting(item_list)
File "plexlibrary/recipe.py", line 752, in weighted_sorting
details = self.tmdb.get_details(m['tmdb_id'], self.library_type)
File "plexlibrary/tmdb.py", line 80, in get_details
cache_item = cache[str(tmdb_id)]
File "/usr/lib64/python2.7/shelve.py", line 122, in __getitem__
value = Unpickler(f).load()
ValueError: unsupported pickle protocol: 3
as it's trying to download the list from TMDb
Made the directory manually, had full 777 on the directory, running the script as sudo
Ah, remove the \ from Plex\ Media, maybe put the path in quotes, and it should work. Error just means the script can't find the directory. I'll improve the error handling there a bit.
For the pickle error, when you go from running python 3 to 2 you have to delete the tmdb_details.shelve from /tmp.
old issue but I just restored from a backup and had to chmod 777 -R /mnt/plexlib/ to give the correct permissions back and after that it was able to create symlinks again and all is well