Skip to content

Try to detect if somethings wrong with the provided project #38

Open
@ap--

Description

@ap--

from @vankhoa21991

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-10-1c484506e8c5> in <module>
----> 1 qp = QuPathProject('./my_qupath_project', mode="a")
      2 qp.images  # <- access images via this
c:\somewhere\github\paquo\paquo\projects.py in __init__(self, path, mode, image_provider)
    197             for f in p_dir.iterdir():
    198                 if not f.match("*.backup"):
--> 199                     raise ValueError("will only create projects in empty directories")
    200             project = Projects.createProject(File(str(p_dir)), BufferedImage)
    201 
ValueError: will only create projects in empty directories

The project was a folder with images already added but no project.qpproj file.
Likely from a previous run, where QuPathProject.save wasn't called.

There should be a better error message in case this happens.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions