Skip to content

"Unexplained problem" while patching #3

Open
@JoeyGH

Description

@JoeyGH

I have two files:

OldFile.txt with content:

Text.

NewFile.txt with content:

New text.
Text.

Then I run the example provided in readme:

import librsync

dst = file('OldFile.txt', 'rb')
src = file('NewFile.txt', 'rb')
synced = file('Synced.txt', 'wb')

signature = librsync.signature(dst)
delta = librsync.delta(src, signature)
librsync.patch(dst, delta, synced)

And get the following error:

Traceback (most recent call last):
  File "_ctypes/callbacks.c", line 314, in 'calling callback function'
TypeError: read_cb() takes exactly 3 arguments (4 given)
python: ERROR: (rs_job_complete) patch job failed: unexplained problem
Traceback (most recent call last):
  File "RsyncTest.py", line 12, in <module>
    librsync.patch(dst, delta, synced)
  File "/usr/local/lib/python2.7/dist-packages/librsync/__init__.py", line 113, in wrapper
    return f(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/librsync/__init__.py", line 228, in patch
    _execute(job, d, o)
  File "/usr/local/lib/python2.7/dist-packages/librsync/__init__.py", line 141, in _execute
    raise LibrsyncError(r)
librsync.LibrsyncError: unexplained problem

I tried syncing many different files and all went well, but this one case just won't work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions