I've run into this bug a couple times in recent months, and it seems to be occur when deleting a sample field from a fiftyone dataset.
To reproduce the bug you can:
- Load a dataset into fityone
- Add some sort of field to the samples, a prediction field for instance.
- Delete that field from the dataset using the following python code
dataset = fiftyone.load_dataset("my_dataset")
dataset.delete_sample_field("sample_field_to_delete")
Then, when I go to add a sample field or even iterate over the samples in the dataset I'm greeted with this error:
mongoengine.errors.FieldDoesNotExist: The fields "{'3c_320_30_01'}" do not exist on the document "samples.65cd2482057b2fee23505215"
This is a mongoengine error, so I'm thinking that something is out of sync with mongodb and fiftyone.
If anyone has run into this error before and knows a fix that would be appreciated.
I was working on something similar today and was not able to reproduce. For reference here was my block.
Can you try this and let me know? Maybe try updating to the latest version