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

get a error when use the method rename_folder #141

Closed
tamgahow111 opened this issue Nov 26, 2023 · 7 comments
Closed

get a error when use the method rename_folder #141

tamgahow111 opened this issue Nov 26, 2023 · 7 comments

Comments

@tamgahow111
Copy link

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 - <Undefined.FileStation.Error>
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

@N4S4
Copy link
Owner

N4S4 commented Nov 26, 2023

Hello, are u trying to rename a file with rename_folder function?

@N4S4 N4S4 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 29, 2023
@doubidoubidou
Copy link

@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

@N4S4
Copy link
Owner

N4S4 commented Jan 2, 2024

Good idea I'll try to have a look, I don't use much this function

@N4S4
Copy link
Owner

N4S4 commented Jan 8, 2024

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

image

@N4S4
Copy link
Owner

N4S4 commented Jan 8, 2024

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 - <Undefined.FileStation.Error>
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?

image

@doubidoubidou
Copy link

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

image

well,it may be useful to others,thanks!

@N4S4
Copy link
Owner

N4S4 commented Jan 9, 2024

@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

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

No branches or pull requests

3 participants