hschauhan / gosync

An Opensource Google Drive client written in Python
https://hschauhan.github.io/gosync/
GNU General Public License v2.0
281 stars 57 forks source link

KeyError: 'limit' #41

Closed smjure closed 3 years ago

smjure commented 4 years ago

First of all thank you for reviving the project. I installed the GoSync successfully on Raspberry Pi 4B based on the YouTube link. Then when I run then the GoSync command as the last command, I get the following error:

Traceback (most recent call last): File "/usr/local/bin/GoSync", line 10, in <module> sys.exit(main()) File "/usr/local/lib/python3.7/dist-packages/GoSync/GoSync.py", line 38, in main controller = GoSyncController() File "/usr/local/lib/python3.7/dist-packages/GoSync/GoSyncController.py", line 135, in __init__ self.FileSizeHumanize(long(self.aboutdrive['storageQuota']['limit']))) KeyError: 'limit'

It seems there is space limit, which is true for the partition where GoSync is installed. I want to actually point it to a NAS disk. How can I do that? Thanks in advance.

hschauhan commented 4 years ago

which version is it? Also can you try with latest code in github?

On 25/05/20 11:17 pm, smjure wrote:

First of all thank you for reviving the project. I installed the GoSync successfully on Raspberry Pi 4B based on the YouTube link. Then when I run then the GoSync command as the last command, I get the following error:

|Traceback (most recent call last): File "/usr/local/bin/GoSync", line 10, in sys.exit(main()) File "/usr/local/lib/python3.7/dist-packages/GoSync/GoSync.py", line 38, in main controller = GoSyncController() File "/usr/local/lib/python3.7/dist-packages/GoSync/GoSyncController.py", line 135, in init self.FileSizeHumanize(long(self.aboutdrive['storageQuota']['limit']))) KeyError: 'limit'|

It seems there is space limit, which is true for the partition where GoSync is installed. I want to actually point it to a NAS disk. How can I do that? Thanks in advance.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hschauhan/gosync/issues/41, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABXIYY2JEIAAVKECCPKSYTRTKVLZANCNFSM4NJV4J3Q.

hschauhan commented 4 years ago

By the way, this limit has nothing to do with your Disk or Google drive limit. This is a code error. That's why I am asking to try latest code in github. Let me know if you want to know how to do it.

smjure commented 4 years ago

Thanks for the reply. I believe it's the latest version, have followed the steps from your wiki youtube video - the download is made via git clone https....

Perhaps should mention that I try to link it with G Suite, but should not be a problem since I successfully use it with rclone.

smjure commented 4 years ago

FYI, have tried it also on my laptop with Linux Mint 19.3, the same error pops up.

reece394 commented 4 years ago

I am having the same issue. Using GSuite for Business with unlimited cloud storage. It could be crashing due to expecting a storage limit on Google Drive but GSuite doesn't have one. Is it stored as a number by any chance? Was skimming the code and saw your use of long. Maybe Google Drive is returning Unlimited as a string?

arentoine commented 3 years ago

Hello smjure,

It took me some time to realize, as for The Matrix where "... there is no spoon!", that there is not limit in G Suite... :-)

I pushed a fix where the limit is set to the current usage.

If you could test it and keep us posted ?

Regards

Alain

reece394 commented 3 years ago

This has fixed the error. It no longer appears and allows Google Drive to be queried and I tested syncing some files and it works. Thanks for fixing it

smjure commented 3 years ago

Also myself tested it and it works great, flawlessly so far... very much appreciated!!