l3uddz / plex_autoscan

Script to assist sonarr/radarr with plex imports. Will only scan the folder that has been imported, instead of the whole library section.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DEV BRANCH: not able to read filepath from GDrive

hthighway opened this issue · comments

Running the dev branch (was previously using the feat/gdrive branch) and I am getting the following errors on any file from GDrive

2018-06-20 07:18:21,916 - INFO - AUTOSCAN [139856868108032]: Starting queue processor in 10 seconds 2018-06-20 07:18:21,917 - INFO - AUTOSCAN [139856932075264]: Starting server: http://0.0.0.0:23477/xxxxxxxxxxxxxxxxxxxxxxxxxxxx 2018-06-20 07:18:21,917 - INFO - AUTOSCAN [139856859715328]: Starting Google Drive changes monitor in 30 seconds... 2018-06-20 07:18:31,920 - INFO - AUTOSCAN [139856868108032]: Queue processor started 2018-06-20 07:18:31,922 - INFO - AUTOSCAN [139856868108032]: Restored 0 scan requests from database 2018-06-20 07:18:51,949 - INFO - AUTOSCAN [139856859715328]: Google Drive access tokens were successfully loaded 2018-06-20 07:18:51,950 - INFO - AUTOSCAN [139856859715328]: Google Drive changes monitor started 2018-06-20 07:18:52,110 - INFO - GDRIVE [139856859715328]: Renewed access token! 2018-06-20 07:18:52,460 - INFO - AUTOSCAN [139856859715328]: There's 21 Google Drive change(s) to process 2018-06-20 07:18:52,462 - INFO - GDRIVE [139856859715328]: Added '160NJuXCyDrAcuzVPTWB2uvaSQEyid7BG' to cache: The Bold Type - S02E03 - The Scarlet Letter WEBDL-1080p tbs.mkv 2018-06-20 07:18:52,463 - ERROR - GDRIVE [139856859715328]: Exception retrieving filepaths for '160NJuXCyDrAcuzVPTWB2uvaSQEyid7BG': Traceback (most recent call last): File "/home/hthighway/plex_autoscan/gdrive.py", line 182, in get_id_file_paths added_to_cache += get_item_paths(item_id, '', file_paths, added_to_cache) File "/home/hthighway/plex_autoscan/gdrive.py", line 175, in get_item_paths new_cache_entries += get_item_paths(parent, path, paths, new_cache_entries) File "/home/hthighway/plex_autoscan/gdrive.py", line 158, in get_item_paths success, obj = self.get_id_metadata(obj_id) File "/home/hthighway/plex_autoscan/gdrive.py", line 137, in get_id_metadata cached_metadata = self._get_cached_metdata(item_id) File "/home/hthighway/plex_autoscan/gdrive.py", line 225, in _get_cached_metdata return self.cache[item_id] File "/usr/local/lib/python2.7/dist-packages/sqlitedict.py", line 246, in __getitem__ return self.decode(item[0]) File "/usr/lib/python2.7/json/__init__.py", line 339, in loads return _default_decoder.decode(s) File "/usr/lib/python2.7/json/decoder.py", line 364, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python2.7/json/decoder.py", line 380, in raw_decode obj, end = self.scan_once(s, idx) TypeError: first argument must be a string, not buffer 2018-06-20 07:18:52,468 - ERROR - GDRIVE [139856859715328]: Exception retrieving filepaths for '1ITT7TXALJLNKY3v52zydL5eRDUq-smir': Traceback (most recent call last): File "/home/hthighway/plex_autoscan/gdrive.py", line 182, in get_id_file_paths added_to_cache += get_item_paths(item_id, '', file_paths, added_to_cache) File "/home/hthighway/plex_autoscan/gdrive.py", line 175, in get_item_paths new_cache_entries += get_item_paths(parent, path, paths, new_cache_entries) File "/home/hthighway/plex_autoscan/gdrive.py", line 158, in get_item_paths success, obj = self.get_id_metadata(obj_id) File "/home/hthighway/plex_autoscan/gdrive.py", line 137, in get_id_metadata cached_metadata = self._get_cached_metdata(item_id) File "/home/hthighway/plex_autoscan/gdrive.py", line 225, in _get_cached_metdata return self.cache[item_id] File "/usr/local/lib/python2.7/dist-packages/sqlitedict.py", line 246, in __getitem__ return self.decode(item[0]) File "/usr/lib/python2.7/json/__init__.py", line 339, in loads return _default_decoder.decode(s) File "/usr/lib/python2.7/json/decoder.py", line 364, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python2.7/json/decoder.py", line 380, in raw_decode obj, end = self.scan_once(s, idx) TypeError: first argument must be a string, not buffer

hmm, maybe I need to run ./scan.py authorize again

Update: that fixed it