Closed MarinBons closed 2 years ago
So if i understand correctly, requesting one parameter only it works otherwise it doesn't? Did you tey to leave it = None?
Yes indeed. I've tried and I get a result without information about size, time, real path or owner 🤷♂️
Mmm ok I will need to look into it
As of May 20th 2022, this still has not been fixed.
True, unfortunately time has not been on my side...I will make some tests
True, unfortunately time has not been on my side...I will make some tests
Does it work for others? I am looking at the code and the "additional" parameter is handled differently
A fix I came up with in the get_file_list
and get_file_info
functions, it is to:
Remove the:
if type(additional) is list:
additional = ','.join(additional)
part and replace it with:
additional = str(additional).replace("'", '"')
This works for my use case. I believe it is todo with requests.get
. It does not seem to like single quotes. And leave additional
as a list, but the type is converted to a string. And replace single quotes with double quotes.
Also sorry if I'm not making sense, just 14 and still learning this "trade". Thanks for this package as well, very useful.
Any help and suggestion are always welcome! So thank you! It was working for me when I used couple months ago, however later tonight I will run few tests and see what is going on
So it looks like when it was requested one additional parameter only worked but not if you request more than one, apparently the request type needs to be packed as list string and not processed, however your fix worked! thank you I will update the code
Hello ! Thanks for the amazing project :) I have got some issues using multiple additional parameters while using get_file_info method
Neither :
fl.get_file_info(path,additional = {'size','time','real_path'})
orfl.get_file_info(path,additional = ['size','time','real_path'])
works.I only have one parameter working or less, like when I use it this way :
fl.get_file_info(path',additional = 'size')
I only have the results like this, so with only one parameter (size, time, real_path or owner) working
{'data': {'files': [{'additional': {'size': 3342336}, 'isdir': False, 'name': 'file_name', 'path': '/path'}]}, 'success': True}