Commit
·
04c89f5
1
Parent(s):
08bea20
check if file path is none before returning
Browse files
objaverse_xl/thingiverse.py
CHANGED
@@ -156,9 +156,10 @@ def download_thingiverse_objects(
|
|
156 |
if processes == 1:
|
157 |
for item in tqdm(items_to_download):
|
158 |
file_path = _download_item(item=item, download_dir=download_dir)
|
159 |
-
|
160 |
-
|
161 |
-
|
|
|
162 |
else:
|
163 |
args = [(item, download_dir) for item in items_to_download]
|
164 |
with Pool(processes=processes) as pool:
|
@@ -173,6 +174,7 @@ def download_thingiverse_objects(
|
|
173 |
[
|
174 |
{"filePath": file_path, **item,}
|
175 |
for item, file_path in items_and_file_paths
|
|
|
176 |
]
|
177 |
)
|
178 |
return out
|
|
|
156 |
if processes == 1:
|
157 |
for item in tqdm(items_to_download):
|
158 |
file_path = _download_item(item=item, download_dir=download_dir)
|
159 |
+
if file_path is not None:
|
160 |
+
out.append(
|
161 |
+
{"filePath": file_path, **item,}
|
162 |
+
)
|
163 |
else:
|
164 |
args = [(item, download_dir) for item in items_to_download]
|
165 |
with Pool(processes=processes) as pool:
|
|
|
174 |
[
|
175 |
{"filePath": file_path, **item,}
|
176 |
for item, file_path in items_and_file_paths
|
177 |
+
if file_path is not None
|
178 |
]
|
179 |
)
|
180 |
return out
|