Seaf-cli refuses to sync with an existing "Repo" (directory?)

Summary: seaf-cli (6.1.5) refuses to synchronize after an initial synchronization.

The first synchronization was successful - the contents of the library were downloaded. They were synchronized with

seaf-cli sync -s -u -p 1234 -l <the lib UUID> -d ~/seafile/seafile/dev-go

Subsequent calls of the same command line crash with

Starting to download ...
Traceback (most recent call last):
  File "/usr/bin/seaf-cli", line 845, in <module>
  File "/usr/bin/seaf-cli", line 841, in main
  File "/usr/bin/seaf-cli", line 578, in seaf_sync
    email, random_key, enc_version, more_info)
  File "/usr/lib/python2.7/dist-packages/pysearpc/", line 112, in newfunc
    return fret(ret_str)
  File "/usr/lib/python2.7/dist-packages/pysearpc/", line 25, in _fret_string
    raise SearpcError(dicts['err_msg'])
pysearpc.common.SearpcError: Repo already exists

I am not sure what Repo is in the error message above

Note: @shoeper suggested that this may not be a bug, in which case providing feedback with a Traceback is, I believe, a design error. Not only it looks like the client crashed, but pysearpc.common.SearpcError: Repo already exists hardly explains what the problem is (particularly the “Repo” part, which I read as “git repository”).

Repo, as it applies to Seafile, refers to folders inside the seafile-data folder. Those are your repositories. Unfortunately, they chose to call those the same thing as they do on git… A git repository is just a repository of code stored on git. The message you are getting is referring to the repositories (files, commits, etc) on your Seafile server, which could in a way also be called Libraries, excepting they are broken down into parts.

What it looks like is that seafile-cli is trying to create a new one, rather than sync. Unfortunately, though, I am not well versed with seafile-cli. I’m certain someone on this forum can help, though. I just wanted to clarify the confusion on “repositories”, because it confused me when I first initiated Seafile around version 2 or so.

It works like the desktop client. Once a library is in sync the client keeps syncing it. Thus you cannot run sync twice for the same library (and you also cannot sync two libraries with the same local folder) without running unsync in between.

What you most likely want is to just run seaf-cli start (

OK I understand. Thank you

I actually wanted a one-shot synchronization, restarted when needed (not a full download but a synchronization). It would have been some kind of backup where the content would be updated twice a day only.
I will work out how to do that looking at teh code.

Side note for the devs: I still think that dumping a Traceback is not the right way to convey an error message. Especially that the exception is explicitly raised (instead maybe of printing an error message and exit()?)