Skip to content

CLI: individual file download does not work #140

Closed
@wonder-sk

Description

@wonder-sk

If I have a project and want to download a specific version, it's not working. Steps to reproduce:

  1. download the project to a local directory
mergin --username john download john/myproject
  1. go to the project's directory
cd myproject
  1. download a file
mergin --username john download-file --version v273 myfile.gpkg /tmp/myfile-v273.gpkg

It would fail with an unhandled exception:

Unhandled exception!
Traceback (most recent call last):

  File "/home/martin/.local/lib/python3.8/site-packages/mergin/cli.py", line 338, in download_file
    job = download_file_async(mc, project_path, filepath, output, version)

  File "/home/martin/.local/lib/python3.8/site-packages/mergin/client_pull.py", line 604, in download_file_async
    mp = MerginProject(project_dir)

  File "/home/martin/.local/lib/python3.8/site-packages/mergin/merginproject.py", line 46, in __init__
    raise InvalidProject('Project directory does not exist')

mergin.common.InvalidProject: Project directory does not exist

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions