Skip to content

Cannot Export Dataset (Key Error) #219

Description

@Rifuath

Got an Error while Exporting the Annotations to Training Datasets.

I have used a custom labelset for my project and have used default settings while exporting.
I have other labels that has zero, which i have not selected using the eye button on the label window
I got the following error while doing that:

Image

fig 1 showing the exporting processes

Image

fig 2 Showing labelset window

**PS C:\Users\RifuathAboobakuru\Dev\TagLab> py -3.11 taglab.py** _TagLab 2026.4.1 C:\Users\RifuathAboobakuru\AppData\Local\Python\pythoncore-3.11-64\Lib\site-packages\rasterio\__init__.py:297: NotGeoreferencedWarning: Dataset has no geotransform, gcps, or rpcs. The identity matrix will be returned. dataset = DatasetReader(path, driver=driver, sharing=sharing, **kwargs) ADJUSTED EXPORT AREA: [124, 10, 16896, 16384] Traceback (most recent call last): File "C:\Users\RifuathAboobakuru\Dev\TagLab\taglab.py", line 5370, in exportNewDataset new_dataset.setupAreas(mode.upper(), target_classes) File "C:\Users\RifuathAboobakuru\Dev\TagLab\source\NewDataset.py", line 708, in setupAreas val_area, test_area = self.findAreas(target_classes=target_classes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\RifuathAboobakuru\Dev\TagLab\source\NewDataset.py", line 440, in findAreas landscape_number, landscape_coverage, landscape_PSCV = self.calculateMetrics([0, 0, map_w, map_h], target_classes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\RifuathAboobakuru\Dev\TagLab\source\NewDataset.py", line 334, in calculateMetrics if self.frequencies[key] > 0.0: ~~~~~~~~~~~~~~~~^^^^^_ KeyError: (0, 'Hydnophora')

Environment

TagLab version: 2026.4.1
OS: Windows
Python: 3.11

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions