Common Errors That Abort the Lightly Worker

The Lightly Worker run is aborted in cases where provided input data are invalid or the datapool is misconfigured. You can find below common cases where the Lightly Worker run is aborted.

Corrupt Images

The Lightly Worker performs a corruption check of the samples (either images or videos) provided for a run. Only the non-corrupted samples are considered for selection. If all of the provided samples are corrupt, the Lightly Worker is aborted with an informative message.

For instance, if 100 images are provided as input for selection and they are all corrupt, the Lightly Worker is aborted and informs that:


All 100 images have been flagged as corrupt.

Invalid Metadata

The Lightly Worker aborts if any of the provided metadata are invalid.

  • If a metadata file is not provided in a valid JSON format, an error is raised for that file with the message:


Invalid JSON format

  • If a metadata file does not follow the metadata format that the Lightly Worker expects, an error is raised informing you about the invalid formatting. As an example, if the "filename" attribute of the metadata file is not a string, but an integer, the error raised will notify that:


Metadata attribute 'filename' is of type int instead of str.

Invalid Predictions

When predictions are provided for a task, they are validated to ensure that their format follows the format expected by the Lightly Worker. If all provided predictions are invalid for a task, one of the two following scenarios occurs:

  • If the task is included in the selection configuration of the scheduled run: The run is aborted.
  • If the task is not included in the selection configuration of the scheduled run: A warning is raised.

As an example, if a task, named object-detection, with all 100 predictions in an invalid format is included in the Lightly datasource and the task is specified at the selection configuration, the run is aborted with a message:


For task object-detection all 100 out of 100 predictions are invalid.

Dataset Already Exists

If an already used dataset name (e.g. "my_dataset_name") is specified and the datapool feature is disabled in the selection configuration, the Lightly Worker run is aborted with the informative message:


Datapool is disabled but the target dataset 'my_dataset_name' is not empty. To enable the datapool set worker_config= {use_datapool:True}.

There are two different ways to resolve this according to what you want to do:

  • In case you want to add samples to an existing dataset: Specify that you want to use the datapool feature by setting worker_config= {use_datapool:True} in the selection configuration of the run. In that case, also specify as dataset name, the name of the existing dataset you want to add samples to.
  • In case you want to create a new dataset: Select a new dataset name.

Datapool Configuration

The datapool feature allows to add new samples to an existing dataset. It is enabled by setting worker_config= {use_datapool:True}. If the datapool feature is misconfigured, the Lightly Worker run is aborted. Common issues that arise are the following:

No New Samples in the New Scheduled Run

If there is no new data found to process in a scheduled datapool, the Lightly Worker run is aborted. As an example, if there are no new images to schedule in a datapool run, it is aborted with the message:


No new images to process in input datasource.

To circumvent this error, make sure to schedule datapool runs with new samples compared to the runs preceding them.

No New Selected Samples in the Scheduled Run

If a datapool run leads to the selection of data that have all already been selected in a previous run, the Lightly Worker run is aborted with an informative message:


No new samples selected.

This is done to avoid the unnecessary update of the dataset with samples that it already includes. Furthermore, a report is not generated for this datapool run.