Skip to content
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

Closed
procmail opened this issue May 20, 2015 · 31 comments
Closed

Unexpected change set data format #44

procmail opened this issue May 20, 2015 · 31 comments

Comments

@procmail
Copy link

Here's what I have when doing a sync on a NAS:

#  python acd_cli.py sync     
Syncing... 
Traceback (most recent call last):
  File "acd_cli.py", line 940, in <module>
    main()
  File "acd_cli.py", line 936, in main
    sys.exit(args.func(args))
  File "acd_cli.py", line 434, in sync_action
    r = sync_node_list(full=args.full)
  File "acd_cli.py", line 115, in sync_node_list
    nodes, purged, ncp, full = metadata.get_changes(checkpoint=None if full else cp, include_purged=not full)
  File "/root/.virtualenvs/acd_cli/acd_cli/acdcli/api/metadata.py", line 71, in get_changes
    o = json.loads(line.decode('utf-8'))
  File "/usr/local/python3/lib/python3.4/json/__init__.py", line 318, in loads
    return _default_decoder.decode(s)
  File "/usr/local/python3/lib/python3.4/json/decoder.py", line 343, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/python3/lib/python3.4/json/decoder.py", line 359, in raw_decode
    obj, end = self.scan_once(s, idx)
ValueError: Unterminated string starting at: line 1 column 2472936 (char 2472935)

15-05-21 01:46:31.276 [WARNING] [acdcli.api.metadata] - End of change request not reached.

@yadayada
Copy link
Owner

Does this happen repeatedly?

@procmail
Copy link
Author

When I tried doing a sync again, I get this:

Traceback (most recent call last):
  File "acd_cli.py", line 940, in <module>
    main()
  File "acd_cli.py", line 936, in main
    sys.exit(args.func(args))
  File "acd_cli.py", line 434, in sync_action
    r = sync_node_list(full=args.full)
  File "acd_cli.py", line 115, in sync_node_list
    nodes, purged, ncp, full = metadata.get_changes(checkpoint=None if full else cp, include_purged=not full)
  File "/root/.virtualenvs/acd_cli/acd_cli/acdcli/api/metadata.py", line 71, in get_changes
    o = json.loads(line.decode('utf-8'))
  File "/usr/local/python3/lib/python3.4/json/__init__.py", line 318, in loads
    return _default_decoder.decode(s)
  File "/usr/local/python3/lib/python3.4/json/decoder.py", line 343, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/python3/lib/python3.4/json/decoder.py", line 359, in raw_decode
    obj, end = self.scan_once(s, idx)
ValueError: Expecting ',' delimiter: line 1 column 1692800 (char 1692799)

@procmail
Copy link
Author

Using a new user account, created a new virtualenv using pyvenv:

(acd_cli) TideOfLight> python acd_cli.py sync
A browser tab will have/be opened at https://tensile-runway-92512.appspot.com/.
Please accept the request and save the plaintext response data into a file called "oauth_data" in the directory "/var/services/homes/admin/.cache/acd_cli".
Then, press a key to continue.

Syncing... 
Traceback (most recent call last):
  File "acd_cli.py", line 940, in <module>
    main()
  File "acd_cli.py", line 936, in main
    sys.exit(args.func(args))
  File "acd_cli.py", line 434, in sync_action
    r = sync_node_list(full=args.full)
  File "acd_cli.py", line 115, in sync_node_list
    nodes, purged, ncp, full = metadata.get_changes(checkpoint=None if full else cp, include_purged=not full)
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/metadata.py", line 71, in get_changes
    o = json.loads(line.decode('utf-8'))
  File "/usr/local/python3/lib/python3.4/json/__init__.py", line 318, in loads
    return _default_decoder.decode(s)
  File "/usr/local/python3/lib/python3.4/json/decoder.py", line 343, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/python3/lib/python3.4/json/decoder.py", line 359, in raw_decode
    obj, end = self.scan_once(s, idx)
ValueError: Unterminated string starting at: line 1 column 327868 (char 327867)
(acd_cli) TideOfLight> 

Then I tried to sync again:

(acd_cli) TideOfLight> python acd_cli.py sync
Syncing... 
Traceback (most recent call last):
  File "acd_cli.py", line 940, in <module>
    main()
  File "acd_cli.py", line 936, in main
    sys.exit(args.func(args))
  File "acd_cli.py", line 434, in sync_action
    r = sync_node_list(full=args.full)
  File "acd_cli.py", line 115, in sync_node_list
    nodes, purged, ncp, full = metadata.get_changes(checkpoint=None if full else cp, include_purged=not full)
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/metadata.py", line 71, in get_changes
    o = json.loads(line.decode('utf-8'))
  File "/usr/local/python3/lib/python3.4/json/__init__.py", line 318, in loads
    return _default_decoder.decode(s)
  File "/usr/local/python3/lib/python3.4/json/decoder.py", line 343, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/python3/lib/python3.4/json/decoder.py", line 359, in raw_decode
    obj, end = self.scan_once(s, idx)
ValueError: Expecting property name enclosed in double quotes: line 1 column 2246851 (char 2246850)

After this I tried to create a remote directory:

(acd_cli) TideOfLight> python acd_cli.py c /Nas
15-05-21 10:10:44.436 [ERROR] [acd_cli] - Invalid parent path "/".

@yadayada
Copy link
Owner

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:] )

@procmail
Copy link
Author

This is what I got:

Fatal error: Token key "expires_in" not found.
Traceback (most recent call last):
  File "test.py", line 4, in <module>
    common.init(acd_cli.CACHE_PATH)
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/common.py", line 61, in init
    return oauth.init(path) and _load_endpoints()
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/oauth.py", line 40, in init
    _get_data()
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/oauth.py", line 67, in _get_data
    _get_auth_token()
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/oauth.py", line 80, in _get_auth_token
    _refresh_auth_token()
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/oauth.py", line 121, in _refresh_auth_token
    _treat_auth_token(r, t)
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/oauth.py", line 99, in _treat_auth_token
    raise e
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/oauth.py", line 95, in _treat_auth_token
    token[EXP_TIME_KEY] = curr_time + token[EXP_IN_KEY] - 120
KeyError: 'expires_in'
(acd_cli) TideOfLight> 

@procmail
Copy link
Author

This is what my oauth_data, which I just received yesterday, says:

{
    "access_token": "[REMOVED]"
    "exp_time": 1432176193.7022769,
    "expires_in": 3600,
    "refresh_token": "Atzr|[REMOVED]"
    "token_type": "bearer"
}

Edit: Tokens removed for security reasons.

@yadayada
Copy link
Owner

In the script that I posted, replace acd_cli.CACHE_PATH by the directory path where your oauth_data file is in.

@procmail
Copy link
Author

(acd_cli) TideOfLight> python test.py 
Fatal error: Token key "expires_in" not found.
Traceback (most recent call last):
  File "test.py", line 4, in <module>
    common.init("/volume1/homes/admin/.cache/acd_cli")
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/common.py", line 61, in init
    return oauth.init(path) and _load_endpoints()
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/oauth.py", line 40, in init
    _get_data()
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/oauth.py", line 67, in _get_data
    _get_auth_token()
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/oauth.py", line 80, in _get_auth_token
    _refresh_auth_token()
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/oauth.py", line 121, in _refresh_auth_token
    _treat_auth_token(r, t)
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/oauth.py", line 99, in _treat_auth_token
    raise e
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/oauth.py", line 95, in _treat_auth_token
    token[EXP_TIME_KEY] = curr_time + token[EXP_IN_KEY] - 120
KeyError: 'expires_in'
(acd_cli) TideOfLight> ls -al /volume1/homes/admin/.cache/acd_cli
drwxrwxrwx    2 admin    users         4096 May 21 09:46 .
drwxrwxrwx    3 admin    users         4096 May 21 09:45 ..
-rwxrwxrwx    1 admin    users          204 May 21 09:46 endpoint_data
-rwxrwxrwx    1 admin    users        15360 May 21 09:46 nodes.db
-rwxrwxrwx    1 admin    users         1011 May 21 09:46 oauth_data

@yadayada
Copy link
Owner

Please try again with the latest commit. Also, could you tell me what machine this is running on?

@yadayada yadayada changed the title new machine - sync Unexpected change set data format May 22, 2015
@procmail
Copy link
Author

I'm running this on a synology NAS. Just pulled the latest changes:

(acd_cli) TideOfLight> python acd_cli.py sync
Traceback (most recent call last):
  File "acd_cli.py", line 963, in <module>
    main()
  File "acd_cli.py", line 943, in main
    if not common.init(CACHE_PATH):
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/common.py", line 61, in init
    return oauth.init(path) and _load_endpoints()
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/oauth.py", line 34, in init
    _load_data()
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/oauth.py", line 60, in _load_data
    _get_auth_token(reload=False)
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/oauth.py", line 75, in _get_auth_token
    _refresh_auth_token()
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/oauth.py", line 116, in _refresh_auth_token
    'Error refreshing authentication token: %s' % requests.text)
AttributeError: 'module' object has no attribute 'text'

@yadayada
Copy link
Owner

I don't know how this could even happen.

  1. The oauth_data file is loaded and validated. This means there is a refresh token in the file
  2. The expiration time is in the past, so the token refresh is triggered
  3. The refresh token is successfully taken from the oauth dict in memory and put in the request
  4. tensile-runway-92512.appspot.com does not receive the refresh key in the request body and returns a 400 error.

Please run acd_cli -d init and look for these lines:

15-05-22 14:01:20.226 [INFO] [acdcli.api.oauth] - Refreshing authentication token.
15-05-22 14:01:20.230 [INFO] [requests.packages.urllib3.connectionpool] - Starting new HTTPS connection (1): tensile-runway-92512.appspot.com
send: b'POST / HTTP/1.1\r\nHost: tensile-runway-92512.appspot.com\r\nConnection: keep-alive\r\nAccept: */*\r\nContent-Type: application/x-www-form-urlencoded\r\nUser-Agent: acd_cli/0.2.1 python-requests/2.7.0 CPython/3.4.3+ Linux/3.16.0-4-amd64\r\nContent-Length: 452\r\nAccept-Encoding: gzip, deflate\r\n\r\nrefresh_token=Atzr[REMOVED]`
reply: 'HTTP/1.1 200 OK\r\n'
15-05-22 14:01:21.143 [DEBUG] [requests.packages.urllib3.connectionpool] - "POST / HTTP/1.1" 200 999

and see if the refresh_token is in the body.

@procmail
Copy link
Author

Here's what I see:

15-05-22 21:08:16.188 [INFO] [acd_cli] - Plugin leaf classes: StreamPlugin, TestPlugin
15-05-22 21:08:16.226 [INFO] [acd_cli] - StreamPlugin attached.
15-05-22 21:08:16.227 [INFO] [acd_cli] - TestPlugin attached.
15-05-22 21:08:16.231 [INFO] [acdcli.api.common] - Initializing acd with path "/var/services/homes/admin/.cache/acd_cli".
15-05-22 21:08:16.244 [INFO] [acdcli.api.oauth] - Token expired at 2015-05-21 10:43:13.702276.
15-05-22 21:08:16.246 [INFO] [acdcli.api.oauth] - Refreshing authentication token.
15-05-22 21:08:16.437 [INFO] [requests.packages.urllib3.connectionpool] - Starting new HTTPS connection (1): tensile-runway-92512.appspot.com
send: b'POST / HTTP/1.1\r\nHost: tensile-runway-92512.appspot.com\r\nConnection: keep-alive\r\nUser-Agent: acd_cli/0.2.1 python-requests/2.7.0 CPython/3.4.1 Linux/2.6.32.12\r\nAccept: */*\r\nContent-Length: 453\r\nAccept-Encoding: gzip, deflate\r\nContent-Type: application/x-www-form-urlencoded\r\n\r\nrefresh_token=Atzr%7C.IQEBLjAsAhdfgfdgdgdfgdfgdfgdfs7Y8fdJxVLCuIWfP3iq0qLlfvhMy3_LCTCN8KWx58sk75EB_DKF14qsswVczBGKfJH3LoMRcaLvYAlk1n4OYcXdfgsdfgdfgdfsgsdfdfgEzZB-H6yi4rc_S9azRCPY-bn4Ngo-PCuZIj7P7d8kIk353KBg8Hs0Eg1FNA6EqcGB1Z63p8qjJTzCgzmtDQ7GRqqgplyICLxqpm1qZRToVNUh6AyG-TkvaUM0P1xEeORMGPrSe0Idsfgdfsgdfsgdfgdfgfg8rVo1t-9cBl_sQ3S7U7ISlrnMDRy5edY_iYCTB9t6XYOejaALhdgC-wTXONHsJW0zrdQaOsM4nC5UbewT0FalrouBFA'
reply: 'HTTP/1.1 400 Bad Request\r\n'
15-05-22 21:08:17.047 [DEBUG] [requests.packages.urllib3.connectionpool] - "POST / HTTP/1.1" 400 120
header: Content-Type header: Cache-Control header: Date header: Server header: Content-Length header: Alternate-Protocol Traceback (most recent call last):
  File "acd_cli.py", line 963, in <module>
    main()
  File "acd_cli.py", line 943, in main
    if not common.init(CACHE_PATH):
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/common.py", line 61, in init
    return oauth.init(path) and _load_endpoints()
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/oauth.py", line 34, in init
    _load_data()
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/oauth.py", line 60, in _load_data
    _get_auth_token(reload=False)
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/oauth.py", line 75, in _get_auth_token
    _refresh_auth_token()
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/oauth.py", line 116, in _refresh_auth_token
    'Error refreshing authentication token: %s' % requests.text)
AttributeError: 'module' object has no attribute 'text'
(acd_cli) TideOfLight> 

I've modified the refresh_token in the POST body a little before pasting so obscure it.
Not sure if this matters, but the refresh_token starts with "Atzr|IQEB..." There's a pipe symbol in it.

@yadayada
Copy link
Owner

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.

@procmail
Copy link
Author

15-05-22 22:29:16.110 [INFO] [acd_cli] - Plugin leaf classes: TestPlugin, StreamPlugin
15-05-22 22:29:16.111 [INFO] [acd_cli] - TestPlugin attached.
15-05-22 22:29:16.113 [INFO] [acd_cli] - StreamPlugin attached.
15-05-22 22:29:16.116 [INFO] [acdcli.api.common] - Initializing acd with path "/var/services/homes/admin/.cache/acd_cli".
15-05-22 22:29:16.144 [INFO] [acdcli.api.oauth] - Token expired at 2015-05-21 10:43:13.702276.
15-05-22 22:29:16.145 [INFO] [acdcli.api.oauth] - Refreshing authentication token.
15-05-22 22:29:16.368 [INFO] [requests.packages.urllib3.connectionpool] - Starting new HTTPS connection (1): tensile-runway-92512.appspot.com
send: b'POST / HTTP/1.1\r\nHost: tensile-runway-92512.appspot.com\r\nUser-Agent: acd_cli/0.2.1 python-requests/2.7.0 CPython/3.4.1 Linux/2.6.32.12\r\nAccept: */*\r\nContent-Type: application/x-www-form-urlencoded\r\nAccept-Encoding: gzip, deflate\r\nContent-Length: 453\r\nConnection: keep-alive\r\n\r\nrefresh_token=Atzr%7C.IQEBLjAsAhRBcIKeXK_JBcEzlMNJtcAVZ8X2BgIUaHVSyF9zx4lMN7Y8fdJxVLCuIWfP3iq0qLlfvhMy3_LCTCN8KWx58sk75EB_DKF14qsswVczBGKfJH3LoMRcaLvYAlk1n4OYcX8G9ePYxSgxqdTA97GIp4BCphKTEzZB-H6yi4rc_S9azRCPY-bn4Ngo-PCuZIj7P7d8kIk353KBg8Hs0Eg1FNA6EqcGB1Z63p8qjJTzCgzmtDQ7GRqqgplyICLxqpm1qZRToVNUh6AyG-TkvaUM0P1xEeORMGPrSe0IHml4d7d0rDMB6mnhWqKJ7L7aGZeZ1TPW7Te9dn1j8rVo1t-9cBl_sQ3S7U7ISlrnMDRy5edY_iYCTB9t6XYOejaALhdgC-wTXONHsJW0zrdQaOsM4nC5UbewT0FalrouBFA'
reply: 'HTTP/1.1 400 Bad Request\r\n'
15-05-22 22:29:16.949 [DEBUG] [requests.packages.urllib3.connectionpool] - "POST / HTTP/1.1" 400 1033
header: Content-Type header: Cache-Control header: Date header: Server header: Content-Length header: Alternate-Protocol Traceback (most recent call last):
  File "acd_cli.py", line 963, in <module>
    main()
  File "acd_cli.py", line 943, in main
    if not common.init(CACHE_PATH):
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/common.py", line 61, in init
    return oauth.init(path) and _load_endpoints()
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/oauth.py", line 34, in init
    _load_data()
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/oauth.py", line 60, in _load_data
    _get_auth_token(reload=False)
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/oauth.py", line 75, in _get_auth_token
    _refresh_auth_token()
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/oauth.py", line 116, in _refresh_auth_token
    'Error refreshing authentication token: %s' % response.text)
acdcli.api.common.RequestError: RequestError: 1004, Error refreshing authentication token: {
    "error": "invalid_grant", 
    "error_description": "The request has an invalid grant parameter : refresh_token", 
    "request": "POST / HTTP/1.1\r\nAccept: */*\r\nContent-Length: 453\r\nContent-Type: application/x-www-form-urlencoded\r\nContent_Length: 453\r\nContent_Type: application/x-www-form-urlencoded\r\nHost: tensile-runway-92512.appspot.com\r\nUser-Agent: acd_cli/0.2.1 python-requests/2.7.0 CPython/3.4.1 Linux/2.6.32.12\r\nX-Appengine-City: singapore\r\nX-Appengine-Citylatlong: 1.280095,103.850949\r\nX-Appengine-Country: SG\r\nX-Appengine-Region: ?\r\n\r\nrefresh_token=Atzr%7C.IQEBLjAsAghdfghfghsgsgdfgdfgsfgdfgsdfgdfgdfgsdfgdsfgdsfgsdfgzZB-H6yi4rc_S9azRCPY-bn4Ngo-PCuZIj7P7d8kIk353KBg8Hs0Eg1fgsdfgdsfgdfsgtDQ7GRqqgplyICLxqpm1qZRToVNUh6AyG-TkvaUM0P1sdfgsfgsdfgsdfgsdfgTe9dn1j8rVo1t-9cBl_sQ3S7U7ISdfhdghfghYOejaALhdgC-wTXONHfhdfghrouBFA"
}
(acd_cli) TideOfLight> 

@yadayada
Copy link
Owner

It is Amazon's opinion that your refresh token is invalid. Delete the oauth_data file and retry.
I would still like to see the output of #44 (comment) when it's working again.

@procmail
Copy link
Author

Just deleted the oauth_data again, and got a new one.

output of python test.py is:

(acd_cli) TideOfLight> python test.py
{"reset":true,"checkpoint":"CIPHvN7FKRoA","nodes":     "","s3_resume_storageKey":""}}}],"statusCode":200}
{"reset":false,"checkpoint":"CNPR5qbGKRoA","nodes"     ee, Dalris.,Cheens, Maggle_"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CIi4jZPKKRoA","nodes"     42045ed5e932196fb988.lrprev"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CJaXh5nLKRoA","nodes"     day Party JPGs/DSC_9646.jpg"}}}],"statusCode":200}
{"reset":false,"checkpoint":"COiTi9rLKRoA","nodes"      2009/100_PANA/P1000222.JPG"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CMOmnOTLKRoA","nodes"     /DCIM/100NSC__/DSC_7952.NEF"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CMby9-3LKRoA","nodes"     To be uploaded/CIMG3754.JPG"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CL3ttbjMKRoA","nodes"     st Day - Paris/DSC_1606.NEF"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CIPuzYPNKRoA","nodes"     deviceType":"A2PGLM6YI9EXDZ"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CN22tqrNKRoA","nodes"     /DCIM/106_PANA/P1060272.JPG"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CJSMj67NKRoA","nodes"     oon/Shimin/sd5/P1080240.JPG"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CJDEtrXNKRoA","nodes"     /DCIM/104_PANA/P1040936.JPG"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CNiU1LrNKRoA","nodes"     n Second Shots/DSCN0070.JPG"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CNWawL7NKRoA","nodes"     ustomary)/JPEG/DSC_6980.jpg"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CJ31wtrNKRoA","nodes"     th Colour/JPEG/P1010013.jpg"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CMXnq93NKRoA","nodes"     ":"Redang 2010/P4030110.MP4"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CO6n1-DNKRoA","nodes"     Amed) 03.25.10/P1090399.JPG"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CPGihuTNKRoA","nodes"     City 11.3.2007/CIMG3811.JPG"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CJ25r_7NKRoA","nodes"     JZG 06.07.2009/P1070462.JPG"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CM6944LOKRoA","nodes"     eron Highlands/P1020531.JPG"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CMG9oYbOKRoA","nodes"     angzhou photos/P1040121.JPG"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CKeI1YrOKRoA","nodes"     t Walk 12.6.08/P1030507.JPG"}}}],"statusCode":200}
{"reset":false,"checkpoint":"COXHxo_OKRoA","nodes"     ERIC \u0026 SHIMIN/0531.JPG"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CPnOkafOKRoA","nodes"     /Ah Yi Seafood/P1000587.JPG"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CObEtqvOKRoA","nodes"     os/Misc photos/CIMG8388.JPG"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CPCotdTOKRoA","nodes"     angzhou photos/P1040278.JPG"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CMqKmNfOKRoA","nodes"     s/Group photo @ Dim sum.JPG"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CJax4tzOKRoA","nodes"     TGGKV882KDBEUJZBJ5L6J5P988L"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CKH_49zOKRoA","nodes"     fth Day - Rome/DSC_3775.NEF"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CP7b5NzOKRoA","nodes"     r Days - Italy/DSC_4671.NEF"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CKOT5dzOKRoA","nodes"     moon Previews.lrdata/1/17B9"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CMjG5dzOKRoA","nodes"     moon Previews.lrdata/1/1E99"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CJf35dzOKRoA","nodes"     zed day 2/JPEG/P1010077.jpg"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CMSj5tzOKRoA","nodes"     C1P9FP0DG5Y00IASCCG83LZZPF6"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CIXP5tzOKRoA","nodes"     d day 2/JPEG/P1010281_1.jpg"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CPX75tzOKRoA","nodes"     ding Previews.lrdata/6/6EF2"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CIip59zOKRoA","nodes"     avchd/12-13-2013_080249.tmb"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CMHb59zOKRoA","nodes"     st Day - Paris/DSC_1312.NEF"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CKmi6NzOKRoA","nodes"     ding Previews.lrdata/F/FA52"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CPGS6dzOKRoA","nodes"     nd Day - Paris/DSC_2246.NEF"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CNPQ6tzOKRoA","nodes"     42045ed5e932196fb988.lrprev"}}}],"statusCode":200}
{"reset":false,"checkpoint":"COyi7tzOKRoA","nodes"     r/DSC_2679.NEF@SynoResource"}}}],"statusCode":200}
{"reset":false,"checkpoint":"COi98dzOKRoA","nodes"     ding Previews.lrdata/D/D95A"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CNWI8tzOKRoA","nodes"     ding Previews.lrdata/2/2E13"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CNLP8tzOKRoA","nodes"     ding Previews.lrdata/2/24AC"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CJOV89zOKRoA","nodes"     ding Previews.lrdata/2/23D7"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CM3089zOKRoA","nodes"     n/sd4/107_PANA/P1070971.JPG"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CI_J9dzOKRoA","nodes"     42045ed5e932196fb988.lrprev"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CM-2_dzOKRoA","nodes"     42045ed5e932196fb988.lrprev"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CKil_9zOKRoA","nodes"     42045ed5e932196fb988.lrprev"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CKy7id3OKRoA","nodes"     b47c27cea4102e72ecd9.lrprev"}}}],"statusCode":200}
{"reset":false,"checkpoint":"COOjjd3OKRoA","nodes"     on/FTP/SAMPLES/findfile.htm"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CK3Dj93OKRoA","nodes"     rt/Redang 2010/P4020039.JPG"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CKLckd3OKRoA","nodes"     port/Bali 2010/P3260112.JPG"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CLa0lN3OKRoA","nodes"     b47c27cea4102e72ecd9.lrprev"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CIzlld3OKRoA","nodes"     City 11.3.2007/CIMG3928.JPG"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CM3rnt3OKRoA","nodes"     b47c27cea4102e72ecd9.lrprev"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CKjaoN3OKRoA","nodes"     .2008/101_PANA/P1010723.JPG"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CN-9o93OKRoA","nodes"     angzhou photos/P1030808.JPG"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CKuHoMzPKRoA","nodes"     RL27LZNTBN2OT21HDRRKQ185U9V"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CIP3s9vPKRoA","nodes"     -2012/03-17-2012_124833.tmb"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CIjXvfjPKRoA","nodes"     6L5T9S8MABLSVNQO12VXXQG1PBB"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CN30tJbTKRoA","nodes"     7G6ECKY7VZV7UEAGMXMABDRGJ3X"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CL7csurUKRoA","nodes"     - Magician - Apprentice.txt"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CIeDz-3UKRoA","nodes"     0026 Me (4706)/metadata.opf"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CPzn5v7UKRoA","nodes"     r Get Sick (3942)/cover.jpg"}}}],"statusCode":200}
{"reset":false,"checkpoint":"COOpsYHVKRoA","nodes"      Natural Way To Draw (4771)"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CKPH9ITVKRoA","nodes"     erhood - Oliver Bowden.epub"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CKaRuYjVKRoA","nodes"     Imaging (5369)/metadata.opf"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CMz56ZTVKRoA","nodes"     )/AU9251_C002 - Unknown.pdf"}}}],"statusCode":200}
{"reset":false,"checkpoint":"COu7uajVKRoA","nodes"     d Windows 3rd Edition (106)"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CIq8jqzVKRoA","nodes"     a 2ed Edition - Unknown.pdf"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CKeVoLHVKRoA","nodes"     422)/WoodOrn1 - Unknown.pdf"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CMmkubTVKRoA","nodes"     42045ed5e932196fb988.lrprev"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CM3Px7XVKRoA","nodes"     Main Previews.lrdata/1/1566"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CPrR0rbVKRoA","nodes"     Main Previews.lrdata/2/21ED"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CK6I2LfVKRoA","nodes"     Main Previews.lrdata/2/2EC2"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CKii-bjVKRoA","nodes"     Main Previews.lrdata/3/3AEF"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CJaIorrVKRoA","nodes"     b47c27cea4102e72ecd9.lrprev"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CJ78wrvVKRoA","nodes"     42045ed5e932196fb988.lrprev"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CLiFgL3VKRoA","nodes"     b47c27cea4102e72ecd9.lrprev"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CKOkt77VKRoA","nodes"     5886b0450990119d3a9a.lrprev"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CI-b77_VKRoA","nodes"     42045ed5e932196fb988.lrprev"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CPXkhcHVKRoA","nodes"     42045ed5e932196fb988.lrprev"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CMjAs8LVKRoA","nodes"     42045ed5e932196fb988.lrprev"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CISAs8PVKRoA","nodes"     Main Previews.lrdata/A/ACD2"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CKbC3qbWKRoA","nodes"     Main Previews.lrdata/9/942E"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CMKk4qfWKRoA","nodes"     b47c27cea4102e72ecd9.lrprev"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CJWYoanWKRoA","nodes"     42045ed5e932196fb988.lrprev"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CNO1sKrWKRoA","nodes"     42045ed5e932196fb988.lrprev"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CKjHxqvWKRoA","nodes"     b47c27cea4102e72ecd9.lrprev"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CMa81azWKRoA","nodes"     42045ed5e932196fb988.lrprev"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CK3j9a3WKRoA","nodes"     42045ed5e932196fb988.lrprev"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CI7Opq_WKRoA","nodes"     b47c27cea4102e72ecd9.lrprev"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CKjltrDWKRoA","nodes"     mart Previews.lrdata/1/1047"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CKaGu7HWKRoA","nodes"     -4970-821B-27F65B90B119.dng"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CNbcp7LWKRoA","nodes"     mart Previews.lrdata/3/377E"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CMODmrPWKRoA","nodes"     mart Previews.lrdata/4/4A7E"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CM7moLTWKRoA","nodes"     -4186-818B-E3EDA3610340.dng"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CIuosLXWKRoA","nodes"     mart Previews.lrdata/7/713B"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CIyjvrbWKRoA","nodes"     mart Previews.lrdata/8/8420"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CJisz7fWKRoA","nodes"     mart Previews.lrdata/9/969A"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CNaG3bjWKRoA","nodes"     mart Previews.lrdata/A/A9F3"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CMrd47nWKRoA","nodes"     -4EAD-B50F-CE39ED5A2353.dng"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CNzO_LrWKRoA","nodes"     mart Previews.lrdata/D/D17D"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CNWEprzWKRoA","nodes"     -431A-8FBD-5AD58ED74B26.dng"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CKytgM_WKRoA","nodes"     "","s3_resume_storageKey":""}}}],"statusCode":200}
{"reset":false,"checkpoint":"COvnzNLWKRoA","nodes"     "","s3_resume_storageKey":""}}}],"statusCode":200}
{"reset":false,"checkpoint":"CMaGzdPWKRoA","nodes"     "","s3_resume_storageKey":""}}}],"statusCode":200}
{"reset":false,"checkpoint":"CMaFjdTWKRoA","nodes"     O0UE03TBGGCCID7T9DRWBTDANZ0"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CJDh99bWKRoA","nodes"     "","s3_resume_storageKey":""}}}],"statusCode":200}
{"reset":false,"checkpoint":"CMyHsdjWKRoA","nodes"     "","s3_resume_storageKey":""}}}],"statusCode":200}
{"reset":false,"checkpoint":"CKuPvtzWKRoA","nodes"     "","s3_resume_storageKey":""}}}],"statusCode":200}
{"reset":false,"checkpoint":"CLHVjeHWKRoA","nodes"     "","s3_resume_storageKey":""}}}],"statusCode":200}
{"reset":false,"checkpoint":"CIy97-XWKRoA","nodes"     "","s3_resume_storageKey":""}}}],"statusCode":200}
{"reset":false,"checkpoint":"COup5fXWKRoA","nodes"     "","s3_resume_storageKey":""}}}],"statusCode":200}
{"reset":false,"checkpoint":"CPu9offWKRoA","nodes"     "","s3_resume_storageKey":""}}}],"statusCode":200}
{"reset":false,"checkpoint":"CPHn3PfWKRoA","nodes"     026 SD Card/2013/2013-06-29"}}}],"statusCode":200}
{"reset":false,"checkpoint":"CPKEv_jWKRoA","nodes"     "","s3_resume_storageKey":""}}}],"statusCode":200}
{"reset":false,"checkpoint":"CLn-z_nWKRoA","nodes"     "","s3_resume_storageKey":""}}}],"statusCode":200}
{"reset":false,"checkpoint":"CL_djvrWKRoA","nodes"     "","s3_resume_storageKey":""}}}],"statusCode":200}
{"reset":false,"checkpoint":"CObA0N_XKRoA","nodes"     MYYE5TYVM7KJCRY13HWUDPRJ7ZH"}}}],"statusCode":200}
{"end":true}     {"end":true}
(acd_cli) TideOfLight> 

@procmail
Copy link
Author

Error when syncing

(acd_cli) TideOfLight> python acd_cli.py sync
Syncing... 
15-05-22 22:52:01.058 [CRITICAL] [acd_cli] - Sync failed.
RequestError: 1003, [acd_cli] Invalid JSON in change set.
Done.

@yadayada
Copy link
Owner

I know, I changed it. Still the same thing.

@procmail
Copy link
Author

Let me do a --verbose when syncing and report back.

@yadayada
Copy link
Owner

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.

@procmail
Copy link
Author

  File "test2.py", line 12, in <module>
    json.loads(line)
NameError: name 'json' is not defined

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:

..............."properties":{"CloudDrive":{"s3_bucket":"cd-na-prod-content","s3_storageKey":"J5RLY0S1SKB2B5AMP3VABLN6MOLY9M3ZY2RW0CL3VKN2SQ0SBU"}}}],"statusCode":200}
{"end":true}

Then:

(acd_cli) TideOfLight> python acd_cli.py --verbose sync
15-05-22 23:16:46.762 [INFO] [acd_cli] - Plugin leaf classes: StreamPlugin, TestPlugin
15-05-22 23:16:46.764 [INFO] [acd_cli] - StreamPlugin attached.
15-05-22 23:16:46.766 [INFO] [acd_cli] - TestPlugin attached.
15-05-22 23:16:46.768 [INFO] [acdcli.api.common] - Initializing acd with path "/var/services/homes/admin/.cache/acd_cli".
15-05-22 23:16:46.792 [INFO] [acdcli.cache.db] - Initializing cache with path "/volume1/homes/admin/.cache/acd_cli".
15-05-22 23:16:47.108 [INFO] [acdcli.cache.db] - Cache not considered uninitialized.
15-05-22 23:16:47.143 [INFO] [acdcli.cache.db] - DB schema version is 1.
Syncing... 
15-05-22 23:16:47.358 [INFO] [acdcli.api.metadata] - Getting changes with checkpoint "None".
15-05-22 23:16:47.436 [INFO] [acdcli.api.common] - POST "https://cdws.us-east-1.amazonaws.com/drive/v1/changes"
15-05-22 23:16:47.558 [INFO] [requests.packages.urllib3.connectionpool] - Starting new HTTPS connection (1): cdws.us-east-1.amazonaws.com
15-05-22 23:16:57.103 [INFO] [acdcli.api.metadata] - Found "reset" tag in changes.
15-05-22 23:18:49.309 [CRITICAL] [acd_cli] - Sync failed.
RequestError: 1003, [acd_cli] Invalid JSON in change set.
Done.

@yadayada
Copy link
Owner

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.

@procmail
Copy link
Author

Next:

(acd_cli) TideOfLight> python test3.py            
Traceback (most recent call last):
  File "test3.py", line 6, in <module>
    common.init(acd_cli.CACHE_PATH)
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/common.py", line 61, in init
    return oauth.init(path) and _load_endpoints()
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/oauth.py", line 34, in init
    _load_data()
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/oauth.py", line 60, in _load_data
    _get_auth_token(reload=False)
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/oauth.py", line 75, in _get_auth_token
    _refresh_auth_token()
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/api/oauth.py", line 116, in _refresh_auth_token
    'Error refreshing authentication token: %s' % response.text)
acdcli.api.common.RequestError: RequestError: 1004, Error refreshing authentication token: {
    "error": "invalid_grant", 
    "error_description": "The request has an invalid grant parameter : refresh_token", 
    "request": "POST / HTTP/1.1\r\nAccept: */*\r\nContent-Length: 454\r\nContent-Type: application/x-www-form-urlencoded\r\nContent_Length: 454\r\nContent_Type: application/x-www-form-urlencoded\r\nHost: tensile-runway-92512.appspot.com\r\nUser-Agent: acd_cli/0.2.1 python-requests/2.7.0 CPython/3.4.1 Linux/2.6.32.12\r\nX-Appengine-City: singapore\r\nX-Appengine-Citylatlong: 1.280095,103.850949\r\nX-Appengine-Country: SG\r\nX-Appengine-Region: ?\r\n\r\nrefresh_token=Atzr%7C.IQEBLzAtAhRc-gCaaLLBgH0kXy4UJW1Jn9tuZwIVAIwk3z4rAT5GVHnCvv4Z7Rl_yTSNVp1KHEKH9-D4b0F1vAXETMy0k5M4J0UAitORI_ee_SE0srsgim4nlGDxkwBts0TU48S7mqE6wB4G-bjb4zANeAC8eI987F0jnlHgm1dY98hZeRkWEXIGhf7OIfhQI-9xNj9216QKoWReJsnEmiugfJTXVeFXSVN1bnZOtdzhWypzOMMh7ibVF9UHWQrFyiDS8aIORY0Xn9PuJdxpUiNWfG1MKQqRckCa-UW5SdGGkHR0WIRA7n44uYSexyEQowOFtyGnduu-_6jdBio1MosbCYnNlD1QtqAYl7HruRWCSIW2YHbr6zPc0x6gj_3omAwB0F03u4h6FNVJzBSql52HvQkft8QCJtlQFep3D4NDi_jgm"
}

@yadayada
Copy link
Owner

We already had this an hour ago. There is nothing I can do about this.

@procmail
Copy link
Author

Does it matter that I have another machine that is uploading files to the drive in the meantime?

@procmail
Copy link
Author

Replaced the oauth_data file:

(acd_cli) TideOfLight> python test3.py > test3.log
Traceback (most recent call last):
  File "test3.py", line 9, in <module>
    checkpoint = db.KeyValueStorage['checkpoint']
  File "/volume1/homes/admin/virtualenvs/acd_cli/acd_cli/acdcli/cache/db.py", line 44, in __getitem__
    raise KeyError
KeyError

@yadayada
Copy link
Owner

Does it matter that I have another machine that is uploading files to the drive in the meantime?

Maybe if you copied the oauth_data. I haven't tried that.

So... #44 (comment) does work now and syncing doesn't?

@procmail
Copy link
Author

Maybe if you copied the oauth_data. I haven't tried that.

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.

@yadayada
Copy link
Owner

Sorry, I can't help you. That code snippet is essentially the same as the code that fails.

@yadayada
Copy link
Owner

I forgot to mention there is still the undocumented old-sync action. But it will be very slow if you have many files, as it needs to make a dedicated request for each 200 nodes.

@meiner1er
Copy link

I got this error when trying "acdcli sync" with my amaon cloud on my ubuntu server:

Inserting nodes.16-08-20 11:05:45.425 [WARNING] [acdcli.api.metadata] - End of change request not reached.

I didn't change anything on my server. It worked for weeks, and suddently it didn't.
As @yadayada suggested I tried "old-sync", and this worked!
My problem is solved.
I'm posting this in case anyone else has a similar problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants