Skip to content
Snippets Groups Projects
Commit 6390144e authored by Christopher Randolph Rhodes's avatar Christopher Randolph Rhodes
Browse files

Filelist is reindexed after resolving multiposition files

parent a50c2f1e
No related branches found
No related tags found
No related merge requests found
......@@ -120,6 +120,8 @@ class FileBatchRunnerClient(HttpClient):
df = pd.DataFrame(paths).head(min(max_count, len(paths)))
else:
df = pd.DataFrame(paths)
if len(df) == 0:
raise EmptyFileListError('No files were found')
df['exists'] = df['path'].apply(lambda x: x.exists())
df['parent'] = df['path'].apply(lambda x: x.parent)
df['filename'] = df['path'].apply(lambda x: x.name)
......@@ -144,7 +146,7 @@ class FileBatchRunnerClient(HttpClient):
df_gb['position'] = df_gb['accessor_id'].apply(lambda x: range(0, len(x)))
df_gb = df_gb.explode(['accessor_id', 'position'])
accessor_ids.append(df_gb)
self.stacks = pd.concat(accessor_ids)
self.stacks = pd.concat(accessor_ids).reset_index()
self.write_df()
def queue_tasks(self):
......@@ -207,6 +209,9 @@ class Error(Exception):
class FileNotFoundError(Error):
pass
class EmptyFileListError(Error):
pass
class WatchPathVerificationError(Error):
pass
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment