How to upload a file to a library using the seafile python api

Hi there,

I am trying to upload a file to an existing seafile library using the python api (


however, I get

Traceback (most recent call last):
File “./”, line 106, in
File “/srv/seafile/seafile-server-latest/seafile/lib64/python2.7/site-packages/seaserv/”, line 230, in post_file
filename, username)
File “/srv/seafile/seafile-server-latest/seafile/lib64/python2.7/site-packages/pysearpc/”, line 112, in newfunc
return fret(ret_str)
File “/srv/seafile/seafile-server-latest/seafile/lib64/python2.7/site-packages/pysearpc/”, line 11, in _fret_int
raise SearpcError(dicts[‘err_msg’])
pysearpc.common.SearpcError: Invalid input file

What works is to put an empty file (of the same name) into the library


any hints here? unfortunately there is almost no documentation on the python api (I am only aware of this: )

any hints welcome.


ah, schedule_file (the local file) needs to be an absolute path.