dsoprea / GDriveFS

An innovative FUSE wrapper for Google Drive.
GNU General Public License v2.0
662 stars 96 forks source link

not working on Debian Stretch #181

Closed hofikhof closed 6 years ago

hofikhof commented 6 years ago

gdfs mount correct, but listing mounted directory fail - error in/out debug output => error on root directory google drive

dsoprea commented 6 years ago

Not nearly enough information. Please share what you've actually seen. If you haven't mounted directly and with the -d option, please do and share the logs.

On Oct 9, 2017 07:41, "hofikhof" notifications@github.com wrote:

gdfs mount correct, but listing mounted directory fail - error in/out debug output => error on root directory google drive

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dsoprea/GDriveFS/issues/181, or mute the thread https://github.com/notifications/unsubscribe-auth/AArralEzFqpGFV4psZrYAKjdppjgzJKqks5sqgZrgaJpZM4PyW1q .

hofikhof commented 6 years ago

root@rpi-hofik:/home/pi# sudo gdfs -o allow_other /home/pi/gdfs.creds /mnt/gdrivefs Traceback (most recent call last): File "/usr/local/bin/gdfs", line 4, in import('pkg_resources').run_script('gdrivefs==0.14.8', 'gdfs') File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 3019, in @_call_aside File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 3003, in _call_aside f(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 3032, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 655, in _build_master ws.require(requires) File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 963, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 849, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'gdrivefs==0.14.8' distribution was not found and is required by the application root@rpi-hofik:/home/pi# root@rpi-hofik:/home/pi# root@rpi-hofik:/home/pi# root@rpi-hofik:/home/pi# cat /etc/debian_version 9.1

hofikhof commented 6 years ago

Mount is without problems but when i use command ls /mnt/gdrivefs

Here is my debug log:

root@rpi-hofik:/home/pi# sudo GD_DEBUG=1 gdfs -o allow_other /home/pi/gdfs.creds /mnt/gdrivefs 2017-10-10 14:38:43,637 [gdrivefs.utility INFO] No extension-mapping was found. 2017-10-10 14:38:43,670 [main DEBUG] Mounting GD with creds at [/home/pi/gdfs.creds]: /mnt/gdrivefs 2017-10-10 14:38:43,672 [gdrivefs.gdfs.gdfuse DEBUG] Setting option [allow_other] to [True]. 2017-10-10 14:38:43,672 [gdrivefs.gdfs.gdfuse DEBUG] Forwarding option [allow_other] with value [True] to FUSE. 2017-10-10 14:38:43,674 [gdrivefs.gdfs.gdfuse DEBUG] FUSE options: {'allow_other': True} 2017-10-10 14:38:43,674 [gdrivefs.gdfs.gdfuse DEBUG] PERMS: F=777 E=666 NE=444 2017-10-10 14:38:43,692 [gdrivefs.gdtool.oauth_authorize INFO] Credentials have expired. Attempting to refresh them. 2017-10-10 14:38:43,692 [gdrivefs.gdtool.oauth_authorize INFO] Doing credentials refresh. 2017-10-10 14:38:43,693 [oauth2client.client INFO] Refreshing access_token 2017-10-10 14:38:43,944 [gdrivefs.gdtool.drive DEBUG] Getting authorized HTTP tunnel. 2017-10-10 14:38:43,945 [gdrivefs.gdtool.drive DEBUG] Got authorized tunnel. FUSE library version: 2.9.7 nullpath_ok: 0 nopath: 0 utime_omit_ok: 0 unique: 1, opcode: INIT (26), nodeid: 0, insize: 56, pid: 0 INIT: 7.26 flags=0x001ffffb max_readahead=0x00020000 2017-10-10 14:38:44,582 [gdrivefs.gdfs.fsutility DEBUG] -------------------------------------------------- 2017-10-10 14:38:44,582 [gdrivefs.gdfs.fsutility DEBUG] >>>>>>>>>> init(23) >>>>>>>>>> (0) 2017-10-10 14:38:44,583 [gdrivefs.gdfs.fsutility DEBUG] DATA: path= [/] 2017-10-10 14:38:44,583 [gdrivefs.gdfs.gdfuse INFO] Activating change-monitor. 2017-10-10 14:38:44,950 [gdrivefs.gdtool.drive DEBUG] Getting authorized HTTP tunnel. 2017-10-10 14:38:44,951 [gdrivefs.gdfs.fsutility DEBUG] <<<<<<<<<< init(23) (0) INIT: 7.19 flags=0x00000011 max_readahead=0x00020000 max_write=0x00020000 max_background=0 congestion_threshold=0 2017-10-10 14:38:44,952 [gdrivefs.gdtool.drive DEBUG] Got authorized tunnel. unique: 1, success, outsize: 40 unique: 2, opcode: ACCESS (34), nodeid: 1, insize: 48, pid: 1164 access / 04 unique: 2, success, outsize: 16 unique: 3, opcode: LOOKUP (1), nodeid: 1, insize: 47, pid: 1164 LOOKUP /.Trash getattr /.Trash 2017-10-10 14:38:44,955 [gdrivefs.gdfs.fsutility DEBUG] -------------------------------------------------- 2017-10-10 14:38:44,956 [gdrivefs.gdfs.fsutility DEBUG] >>>>>>>>>> getattr(4) >>>>>>>>>> (1164) 2017-10-10 14:38:44,956 [gdrivefs.gdfs.fsutility DEBUG] DATA: fh= [None] raw_path= [/.Trash] 2017-10-10 14:38:44,960 [gdrivefs.cache.cacheclient_base DEBUG] CacheClientBase(CacheClientBase,28800) 2017-10-10 14:38:44,961 [gdrivefs.cache.cache_agent INFO] Starting cache-cleanup thread: <gdrivefs.cache.cache_agent.CacheAgent object at 0x75fa6b50> 2017-10-10 14:38:44,962 [gdrivefs.cache.cache_agent INFO] Cache-cleanup thread running: <gdrivefs.cache.cache_agent.CacheAgent object at 0x75fa6b50> 2017-10-10 14:38:44,963 [gdrivefs.gdtool.drive INFO] Getting client for parent-listing. 2017-10-10 14:38:44,963 [gdrivefs.gdtool.drive INFO] Listing entries over child with ID [0APTDjIR-VzQoUk9PVA]. 2017-10-10 14:38:45,779 [gdrivefs.gdtool.drive DEBUG] (1) entries were retrieved. 2017-10-10 14:38:45,780 [gdrivefs.cache.volume DEBUG] Recursively pruning entry with ID [0APTDjIR-VzQoUk9PVA]. 2017-10-10 14:38:45,782 [gdrivefs.gdtool.drive INFO] Listing all files. CONTAINS=[] IS=[.Trash] PARENT_ID=[0APTDjIR-VzQoUk9PVA] 2017-10-10 14:38:45,782 [gdrivefs.gdtool.drive DEBUG] Doing request for listing of files with page-token [None] and page-number (0): '0APTDjIR-VzQoUk9PVA' in parents and title='.Trash' and trashed = false 2017-10-10 14:38:46,218 [gdrivefs.gdtool.drive DEBUG] (0) entries were presented for page-number (0). 2017-10-10 14:38:46,219 [gdrivefs.gdtool.drive DEBUG] No more pages in file listing. 2017-10-10 14:38:46,220 [gdrivefs.gdfs.fsutility DEBUG] <<<<<<<<<< getattr(4) (1164) unique: 3, error: -2 (No such file or directory), outsize: 16 unique: 4, opcode: LOOKUP (1), nodeid: 1, insize: 52, pid: 1164 LOOKUP /.Trash-1000 getattr /.Trash-1000 2017-10-10 14:38:46,221 [gdrivefs.gdfs.fsutility DEBUG] -------------------------------------------------- 2017-10-10 14:38:46,221 [gdrivefs.gdfs.fsutility DEBUG] >>>>>>>>>> getattr(4) >>>>>>>>>> (1164) 2017-10-10 14:38:46,222 [gdrivefs.gdfs.fsutility DEBUG] DATA: fh= [None] raw_path= [/.Trash-1000] 2017-10-10 14:38:46,223 [gdrivefs.gdtool.drive INFO] Listing all files. CONTAINS=[] IS=[.Trash-1000] PARENT_ID=[0APTDjIR-VzQoUk9PVA] 2017-10-10 14:38:46,223 [gdrivefs.gdtool.drive DEBUG] Doing request for listing of files with page-token [None] and page-number (0): '0APTDjIR-VzQoUk9PVA' in parents and title='.Trash-1000' and trashed = false 2017-10-10 14:38:46,563 [gdrivefs.gdtool.drive DEBUG] (0) entries were presented for page-number (0). 2017-10-10 14:38:46,563 [gdrivefs.gdtool.drive DEBUG] No more pages in file listing. 2017-10-10 14:38:46,564 [gdrivefs.gdfs.fsutility DEBUG] <<<<<<<<<< getattr(4) (1164) unique: 4, error: -2 (No such file or directory), outsize: 16 unique: 5, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 6019 getattr / 2017-10-10 14:38:59,601 [gdrivefs.gdfs.fsutility DEBUG] -------------------------------------------------- 2017-10-10 14:38:59,601 [gdrivefs.gdfs.fsutility DEBUG] >>>>>>>>>> getattr(4) >>>>>>>>>> (6019) 2017-10-10 14:38:59,602 [gdrivefs.gdfs.fsutility DEBUG] DATA: fh= [None] raw_path= [/] 2017-10-10 14:38:59,606 [gdrivefs.gdfs.fsutility DEBUG] <<<<<<<<<< getattr(4) (6019) unique: 5, success, outsize: 120 unique: 6, opcode: OPENDIR (27), nodeid: 1, insize: 48, pid: 6020 opendir flags: 0x24800 / opendir[0] flags: 0x24800 / unique: 6, success, outsize: 32 unique: 7, opcode: READDIR (28), nodeid: 1, insize: 80, pid: 6020 readdir[0] from 0 2017-10-10 14:38:59,967 [gdrivefs.gdfs.fsutility DEBUG] -------------------------------------------------- 2017-10-10 14:38:59,967 [gdrivefs.gdfs.fsutility DEBUG] >>>>>>>>>> readdir(5) >>>>>>>>>> (6020) 2017-10-10 14:38:59,968 [gdrivefs.gdfs.fsutility DEBUG] DATA: path= [/] offset= [0] 2017-10-10 14:38:59,968 [gdrivefs.gdfs.fsutility DEBUG] <<<<<<<<<< readdir(5) (6020) 2017-10-10 14:38:59,969 [gdrivefs.gdtool.drive INFO] Listing all files. CONTAINS=[] IS=[] PARENT_ID=[0APTDjIR-VzQoUk9PVA] 2017-10-10 14:38:59,970 [gdrivefs.gdtool.drive DEBUG] Doing request for listing of files with page-token [None] and page-number (0): '0APTDjIR-VzQoUk9PVA' in parents and trashed = false 2017-10-10 14:39:00,596 [gdrivefs.gdtool.drive DEBUG] (53) entries were presented for page-number (0). 2017-10-10 14:39:00,597 [gdrivefs.gdfs.gdfuse ERROR] Could not render list of filenames under path [/]. Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/gdrivefs/gdfs/gdfuse.py", line 197, in readdir (entry_clause[CLAUSE_ID]) File "/usr/local/lib/python2.7/dist-packages/gdrivefs/cache/volume.py", line 407, in get_children_entries_from_entry_id children_tuples = self.get_children_from_entry_id(entry_id) File "/usr/local/lib/python2.7/dist-packages/gdrivefs/cache/volume.py", line 391, in get_children_from_entry_id self.__load_all_children(entry_id) File "/usr/local/lib/python2.7/dist-packages/gdrivefs/cache/volume.py", line 363, in load_all_children children = gd.list_files(parent_id=parent_id) File "/usr/local/lib/python2.7/dist-packages/gdrivefs/gdtool/drive.py", line 56, in wrapper return f(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/gdrivefs/gdtool/drive.py", line 382, in list_files entry_raw) File "/usr/local/lib/python2.7/dist-packages/gdrivefs/gdtool/normal_entry.py", line 69, in init__ raw_data[u'lastModifyingUserName'] KeyError: u'lastModifyingUserName' unique: 7, error: -5 (Input/output error), outsize: 16 unique: 8, opcode: RELEASEDIR (29), nodeid: 1, insize: 64, pid: 0 releasedir[0] flags: 0x0 unique: 8, success, outsize: 16

dsoprea commented 6 years ago

Are you familiar with how to apply PRs or switch branches?

https://github.com/dsoprea/GDriveFS/pull/182

You can also make the change directly:

diff --git a/gdrivefs/gdtool/normal_entry.py b/gdrivefs/gdtool/normal_entry.py
index 77800f5..57bde61 100644
--- a/gdrivefs/gdtool/normal_entry.py
+++ b/gdrivefs/gdtool/normal_entry.py
@@ -66,7 +66,7 @@ class NormalEntry(object):
             raw_data[u'id']

         self.__info['last_modifying_user_name'] = \
-            raw_data[u'lastModifyingUserName']
+            raw_data.get(u'lastModifyingUserName')

If you can test if that works, I can push the change.

unascribed commented 6 years ago

I was having the same issue on Arch Linux, and #182 fixed it for me.

dsoprea commented 6 years ago

Merged. Thanks, guys.

I don't think the platform is relevant. I think it's an obscure occurrence for new files that were created a certain way.

hofikhof commented 6 years ago

182 worked for my. Great job.