Closed tamgahow111 closed 8 months ago
Hello, are u trying to rename a file with rename_folder function?
@N4S4 hi,i found function rename_folder's second error return message"Enter a valid path",but para "name" just need filename instead of filepath,it may cause misunderstandings like this,i think the error message can make a little change so that others can know it when reading function
Good idea I'll try to have a look, I don't use much this function
now i recall that looking at synology docs parameters were reported as they are.
Not sure if to change or not...maybe ill add some explanation
the example: when i use the method delete_blocking_function like fl.delete_blocking_function('/企微发送文件/3212.pdf'),it works no error,but when i use the method rename_folder like fl.rename_folder('/企微发送文件/3212.txt','/企微发送文件/1234.txt'),it raises error
fl.rename_folder('/企微发送文件/3212.pdf','/企微发送文件/122.pdf') /usr/local/lib/python3.7/dist-packages/synology_api/filestation.py(802)rename_folder() -> if search_taskid is not None: (Pdb) c Data request failed: Error 1200 -
Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.7/dist-packages/synology_api/filestation.py", line 802, in rename_folder if search_taskid is not None: File "/usr/local/lib/python3.7/dist-packages/synology_api/auth.py", line 245, in request_data raise FileStationError(error_code=error_code) synology_api.exceptions.FileStationError
have u read this doc to see if anything is wrong?
now i recall that looking at synology docs parameters were reported as they are.
Not sure if to change or not...maybe ill add some explanation
![]()
well,it may be useful to others,thanks!
@N4S4 hi,i found function rename_folder's second error return message"Enter a valid path",but para "name" just need filename instead of filepath,it may cause misunderstandings like this,i think the error message can make a little change so that others can know it when reading function
this has been rectified in the latest commit
the example: when i use the method delete_blocking_function like fl.delete_blocking_function('/企微发送文件/3212.pdf'),it works no error,but when i use the method rename_folder like fl.rename_folder('/企微发送文件/3212.txt','/企微发送文件/1234.txt'),it raises error