Closed mrPsycho closed 3 weeks ago
What OS are you using?
ubuntu under wsl
On Tue, Nov 23, 2021 at 4:34 PM Jay Lee @.***> wrote:
What OS are you using?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jay0lee/GAM/issues/1454#issuecomment-976541913, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGXZ7EGN6OQOM2GVD6IFETUNOJ67ANCNFSM5ITBDOYA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
-- Yaroslav
The issue is likely specific to WSL then. I don't do any testing with WSL and would recommend you run GAM under Windows itself or else via a virtual machine on Ubuntu.
WSL seems to report itself as Linux but then has Windows-like filename restrictions which is likely the source of confusion here. Any fix to this issue would need to be in the form of the pathvalidate package GAM uses to fix filenames:
I can't reproduce this even on WSL. Please show exactly the command you are running and the GAM output as well as the original Drive filename.
Sorry for not answering, yes, i undrestand that this is rare thing...
command:
gam user $USERNAME get drivefile query "'me' in owners" format microsoft targetfolder $BACKUP_PATH/files
and yes, i remember pathvalidate, maybe i'll be able to tix it too. Recorded bug not to forget. A bit later i'll update with names and ways to reproduce.
also i noticed that error:
Downloading: Пример расчета переработок of unknown size to /home/user/tmp/files/Пример расчета переработок.docx
ERROR: Only files with binary content can be downloaded. Use Export with Docs Editors files.". Details: "[{'domain': 'global', 'reason': 'fileNotDownloadable', 'message': 'Only files with binary content can be downloaded. Use Export with Docs Editors files.', 'locationType': 'parameter', 'location': 'alt'}]
Downloading Google Doc: Пример расчета переработок to /home/user/tmp/files/Пример расчета переработок.xlsx
as i understand - this is because file was created bysome third-party service. which stores metadata instead of real result.
Finally i managed to find time and checked it:
mrpsycho@DESKTOP-L6B9C6M:~$ gam user y.n get drivefile query "'me' in owners" format microsoft targetfolder $BACKUP_PATH/files
Searching for files with query: "'me' in owners"...
Got 257 Files...
Downloading Google Doc: Очень длинное имя для файла в гугл документах, для проверки бага и подтверждения нужности правки кода распространяемого беспалатно по лицензии Apache License, Version 2.0, подробнее вы можете узнать из официального репозитория на гихаб: https://github.com/jay0lee/GAM. Спасибо создателю, очень помогает утилита to /files/Очень длинное имя для файла в гугл документах, для проверки бага и подтверждения нужности правки кода распространяемого беспалатно по лицензии Apache License, Version 2.0, подробнее вы можете узнать из официального репозитория на гихаб httpsgithub.comjay.docx
ERROR: [Errno 36] File name too long: '/files/Очень длинное имя для файла в гугл документах, для проверки бага и подтверждения нужности правки кода распространяемого беспалатно по лицензии Apache License, Version 2.0, подробнее вы можете узнать из официального репозитория на гихаб httpsgithub.comjay.docx'
also i see it tries to truncate name, but it doesn't help.
also i checked it with native windows comand line and powershell:
C:\Users\yn\OneDrive\Desktop\gam>gam.exe user y.n get drivefile query "'me' in owners" format microsoft targetfolder files
Searching for files with query: "'me' in owners"...
Got 257 Files...
Downloading Google Doc: Очень длинное имя для файла в гугл документах, для проверки бага и подтверждения нужности правки кода распространяемого беспалатно по лицензии Apache License, Version 2.0, подробнее вы можете узнать из официального репозитория на гихаб: https://github.com/jay0lee/GAM. Спасибо создателю, очень помогает утилита to files\Очень длинное имя для файла в гугл документах, для проверки бага и подтверждения нужности правки кода распространяемого беспалатно по лицензии Apache License, Version 2.0, подробнее вы можете узнать из официального репозитория на гихаб httpsgithub.comjay.docx
ERROR: [Errno 2] No such file or directory: 'files\\Очень длинное имя для файла в гугл документах, для проверки бага и подтверждения нужности правки кода распространяемого беспалатно по лицензии Apache License, Version 2.0, подробнее вы можете узнать из официального репозитория на гихаб httpsgithub.comjay.docx' Downloading Google Doc: План закупок to files\План закупок.xlsx
same result, and it adds extra "\"... don't know why...
and native ubuntu shows same output as with wsl:
user@zentyal02:~$ gam user y.n get drivefile query "'me' in owners" format microsoft targetfolder files
Searching for files with query: "'me' in owners"...
Got 257 Files...
Downloading Google Doc: Очень длинное имя для файла в гугл документах, для проверки бага и подтверждения нужности правки кода распространяемого беспалатно по лицензии Apache License, Version 2.0, подробнее вы можете узнать из официального репозитория на гихаб: https://github.com/jay0lee/GAM. Спасибо создателю, очень помогает утилита to files/Очень длинное имя для файла в гугл документах, для проверки бага и подтверждения нужности правки кода распространяемого беспалатно по лицензии Apache License, Version 2.0, подробнее вы можете узнать из официального репозитория на гихаб httpsgithub.comjay.docx
ERROR: [Errno 36] File name too long: 'files/Очень длинное имя для файла в гугл документах, для проверки бага и подтверждения нужности правки кода распространяемого беспалатно по лицензии Apache License, Version 2.0, подробнее вы можете узнать из официального репозитория на гихаб httpsgithub.comjay.docx'
will tryto read more about pathvalidate, maybe it truncates less than needed.
Full steps to reproduce the issue:
Expected outcome (what are you trying to do?): I expect that file will be downloaded with shorter name, maybe fileID should be used as name.
Actual outcome (what errors or bad behavior do you see instead?): File is not being downloaded.