-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected change set data format #44
Comments
Does this happen repeatedly? |
When I tried doing a sync again, I get this:
|
Using a new user account, created a new virtualenv using pyvenv:
Then I tried to sync again:
After this I tried to create a remote directory:
|
You cannot create a remote directory if your cache is empty because then '/' cannot be resolved to a node id. Could you please paste the following code into a python file, run it in the source root directory and paste the output? import acd_cli
import acdcli.api.common as common
common.init(acd_cli.CACHE_PATH)
r = common.BackOffRequest.post(common.get_metadata_url() + 'changes', stream=True)
for line in r.iter_lines(chunk_size=10 * 1024 ** 2, decode_unicode=False):
if not line:
continue
line = line.decode('utf-8');
print(line[:50] + ' ' + line[-50:] ) |
This is what I got:
|
This is what my oauth_data, which I just received yesterday, says:
Edit: Tokens removed for security reasons. |
In the script that I posted, replace |
|
Please try again with the latest commit. Also, could you tell me what machine this is running on? |
I'm running this on a synology NAS. Just pulled the latest changes:
|
I don't know how this could even happen.
Please run
and see if the refresh_token is in the body. |
Here's what I see:
I've modified the refresh_token in the POST body a little before pasting so obscure it. |
The request seems correct, but https://tensile-runway-92512.appspot.com doesn't receive the refresh token. Please download the lastest commit ... again. I mixed up a variable name. You should get a more useful error from the server now. |
|
It is Amazon's opinion that your refresh token is invalid. Delete the |
Just deleted the oauth_data again, and got a new one. output of python test.py is:
|
Error when syncing
|
I know, I changed it. Still the same thing. |
Let me do a --verbose when syncing and report back. |
Please run this and redirect the output to a file. import acd_cli
import acdcli.api.common as common
common.init(acd_cli.CACHE_PATH)
r = common.BackOffRequest.post(common.get_metadata_url() + 'changes', stream=True)
for line in r.iter_lines(chunk_size=10 * 1024 ** 2, decode_unicode=False):
if not line:
continue
line = line.decode('utf-8');
print(line)
json.loads(line) An error should occur, and the invalid character should be at the specified position in the last line. |
So I added an import json and redirected the output to a file, which is huge, but at the last line there is no error:
Then:
|
Sorry about the missing import. Ok, let's get the partial sync data... import json
import acd_cli
import acdcli.api.common as common
import acdcli.cache.db as db
common.init(acd_cli.CACHE_PATH)
db.init(acd_cli.CACHE_PATH)
checkpoint = db.KeyValueStorage['checkpoint']
body = {}
body['checkpoint'] = checkpoint
body['includePurged'] = 'true'
r = common.BackOffRequest.post(common.get_metadata_url() + 'changes', stream=True, data=json.dumps(body))
for line in r.iter_lines(chunk_size=10 * 1024 ** 2, decode_unicode=False):
if not line:
continue
line = line.decode('utf-8');
print(line)
json.loads(line) I think this should yield an incomplete line or something. |
Next:
|
We already had this an hour ago. There is nothing I can do about this. |
Does it matter that I have another machine that is uploading files to the drive in the meantime? |
Replaced the oauth_data file:
|
Maybe if you copied the So... #44 (comment) does work now and syncing doesn't? |
That's right. After I replaced oauth_data, that one works but syncing still doesn't. |
Sorry, I can't help you. That code snippet is essentially the same as the code that fails. |
I forgot to mention there is still the undocumented |
I got this error when trying "acdcli sync" with my amaon cloud on my ubuntu server:
I didn't change anything on my server. It worked for weeks, and suddently it didn't. |
Here's what I have when doing a sync on a NAS:
The text was updated successfully, but these errors were encountered: