Scille / parsec-cloud

Open source Dropbox-like file sharing with full client encryption !
https://parsec.cloud
Other
260 stars 40 forks source link

ValueError when exporting a realm #6367

Open vxgmichel opened 5 months ago

vxgmichel commented 5 months ago

When using parsec backend sequester export_realm:

Use ^C to stop the export, progress won't be lost when restarting the command
Computing vlobs (i.e. file/folder metadata) to export ✔
About 4 vlobs need to be exported
Exporting vlobs  [------------------------------------]    0%
Error: max() arg is an empty sequence
Traceback (most recent call last):
  File "/app/.heroku/python/bin/parsec", line 8, in <module>
    sys.exit(cli())
  File "/app/.heroku/python/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/app/.heroku/python/lib/python3.9/site-packages/parsec/cli.py", line 45, in patched_cli_main
    return vanilla_cli_main(args=args_list[:], **kwargs)
  File "/app/.heroku/python/lib/python3.9/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/app/.heroku/python/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/app/.heroku/python/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/app/.heroku/python/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/app/.heroku/python/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/app/.heroku/python/lib/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/app/.heroku/python/lib/python3.9/site-packages/parsec/backend/cli/sequester.py", line 759, in export_realm
    trio_run(
  File "/app/.heroku/python/lib/python3.9/site-packages/parsec/utils.py", line 194, in trio_run
    return trio_asyncio.run(async_fn, *args)
  File "/app/.heroku/python/lib/python3.9/site-packages/trio_asyncio/_loop.py", line 446, in run
    return trio.run(_run_task, proc, args)
  File "/app/.heroku/python/lib/python3.9/site-packages/trio/_core/_run.py", line 2010, in run
    raise runner.main_task_outcome.error
  File "/app/.heroku/python/lib/python3.9/site-packages/trio_asyncio/_loop.py", line 444, in _run_task
    return await proc(*args)
  File "/app/.heroku/python/lib/python3.9/site-packages/parsec/backend/cli/sequester.py", line 690, in _export_realm
    new_vlob_batch_offset_marker = await exporter.export_vlobs(
  File "/app/.heroku/python/lib/python3.9/site-packages/parsec/backend/postgresql/sequester_export.py", line 457, in export_vlobs
    return max(r["_id"] for r in rows)
ValueError: max() arg is an empty sequence

Can be reproduced as such:

mmmarcos commented 4 months ago

@vxgmichel should this be fixed for v2.17?