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

下载子文件夹失败 #59

Closed
HalvesChen opened this issue Nov 16, 2022 · 8 comments
Closed

下载子文件夹失败 #59

HalvesChen opened this issue Nov 16, 2022 · 8 comments

Comments

@HalvesChen
Copy link

操作系统信息
ubuntu
python 3.6

错误描述
通过download_folder, file_id下载子文件夹失败,命令只是创建了文件夹,没有下载文件
部分代码如下:

file = ali.get_file_by_path('./scannetv2')
ali.download_folder(file.file_id, local_folder='./traindata')
@HalvesChen HalvesChen changed the title 下载子文件夹中失败 下载子文件夹失败 Nov 16, 2022
@lemisky
Copy link
Member

lemisky commented Nov 16, 2022

aligo 不支持 python 3.6,最低 3.7
python version

@HalvesChen
Copy link
Author

aligo 不支持 python 3.6,最低 3.7 python version

还是不行,代码部分有问题吗?我可以正常打印上面的变量file

@lemisky
Copy link
Member

lemisky commented Nov 16, 2022

你试试这样

file = ali.get_folder_by_path('scannetv2')
ali.download_folder(file.file_id, local_folder='./traindata')

@HalvesChen
Copy link
Author

HalvesChen commented Nov 16, 2022

你试试这样

file = ali.get_folder_by_path('scannetv2')
ali.download_folder(file.file_id, local_folder='./traindata')

sry,我上面的文件路径写错了(我运行的路径没错,只是issue里面写错了),代码如下:

from aligo import Aligo
ali = Aligo()
file=ali.get_folder_by_path('scannet/traindata')
ali.download_folder(file.file_id, local_folder='.')

file可以正常打印出file_idparent_file_id等信息,但还是没法下载,命令运行后只创建了文件夹

@lemisky
Copy link
Member

lemisky commented Nov 16, 2022

那就是 'scannet/traindata' 里面没有文件

@lemisky
Copy link
Member

lemisky commented Nov 16, 2022

程序有报错吗

@lemisky
Copy link
Member

lemisky commented Nov 16, 2022

你看看 file.type 是不是 folder

@HalvesChen
Copy link
Author

你看看 file.type 是不是 folder

ok,解决问题了 :)
我自己的路径搞错了,他这个还是能够get到file我还以为我路径没问题
感谢回复哈

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

2 participants