Loading...
Loading...
Diagnose and fix common FiftyOne issues automatically. Use when a dataset disappeared, the App won't open, changes aren't saving, MongoDB errors occur, video codecs fail, notebook connectivity breaks, operators are missing, or any recurring FiftyOne pain point needs solving.
npx skill4agent add voxel51/fiftyone-skills fiftyone-troubleshootShell commands in this skill are written for macOS/Linux. On Windows (non-WSL), adapt using PowerShell equivalents or use WSL.
pip install fiftyonefo.delete_dataset()fo.list_datasets()fo.load_dataset()len(dataset)dataset.get_field_schema()pymongodb.drop_collection()database_uridatabase_name.zshrc.bash_profileactivateFIFTYONE_DATABASE_NAMEps aux | grep fiftyonepkill -f "fiftyone"import sys
print(f"Python: {sys.executable}")
print(f"Version: {sys.version.split()[0]}")
try:
import fiftyone as fo
print(f"FiftyOne: {fo.__version__}")
print(f"Database: {fo.config.database_name}")
print(f"DB URI: {fo.config.database_uri or '(internal MongoDB)'}")
except ImportError:
print("ERROR: fiftyone not installed — check Python environment, if needed run: pip install fiftyone")
sys.exit(1)
try:
print(f"Datasets: {fo.list_datasets()}")
print("Connection: OK")
except Exception as e:
print(f"Connection ERROR: {e}")
print("→ Match this error to the Issue Index below")This script creates and destroys a temporary test dataset (). It does not touch any user datasets. Do not manually create a dataset with the name "_fo_health_check"._fo_health_check
import fiftyone as fo
import tempfile, os
TEST_NAME = "_fo_health_check"
try:
# Clean up any debris from a previous failed check
if TEST_NAME in fo.list_datasets():
fo.delete_dataset(TEST_NAME)
# Non-persistent: auto-removed if Python exits before cleanup
dataset = fo.Dataset(TEST_NAME, persistent=False)
dataset.add_sample(fo.Sample(
filepath=os.path.join(tempfile.gettempdir(), "health_check.jpg")
))
assert len(dataset) == 1, "Sample write failed"
# Verify connection round-trip
assert TEST_NAME in fo.list_datasets(), "Dataset not listed"
print(f"OK — FiftyOne {fo.__version__} on database '{fo.config.database_name}'")
finally:
# Always clean up, even on failure
if TEST_NAME in fo.list_datasets():
fo.delete_dataset(TEST_NAME)| Symptom | Section |
|---|---|
| Dataset disappeared after restart | Dataset Persistence |
| App won't open / not connected | App Connection |
| Changes not saved | Unsaved Changes |
| Video not playing / codec error | Video Codec |
| Too many open files (macOS) | Open Files Limit |
| App not loading in notebook / remote | Notebook / Remote |
| Plots not showing in notebook | Notebook Plots |
| MongoDB connection failure | MongoDB |
| Operator not found / plugin missing | Missing Plugin |
| "No executor available" | Delegated Operators |
| Dataset is read-only | Read-Only Dataset |
| Slow performance on large datasets | Performance |
| App showing stale / wrong data | Stale Data |
| Downgrading FiftyOne | Downgrading |
| Database version mismatch | DB Version Mismatch |
| Teams / OSS client type mismatch | Teams vs OSS |
import fiftyone as fo
# Make an existing dataset persistent
dataset = fo.load_dataset("my-dataset")
dataset.persistent = True
# Prevention: always create persistent datasets
dataset = fo.Dataset("my-dataset", persistent=True)If the dataset is already gone from, it cannot be recovered through FiftyOne — re-import from source files.fo.list_datasets()
session.wait()session = fo.launch_app(dataset)
session.wait() # keeps the process alive__main__if __name__ == "__main__":
session = fo.launch_app(dataset)
session.wait()session = fo.launch_app(dataset, port=<alternative-port>) # e.g. 5152, 5153pkill -f "fiftyone"sample["my_field"] = "new_value"
sample.save() # requireddataset.info["description"] = "Updated"
dataset.save() # required.save()dataset.set_values("my_field", [v1, v2, ...])⚠️ Re-encoding overwrites files on disk. Show the user the exact paths that will be modified and get explicit confirmation before running.
import fiftyone.utils.video as fouv
# Re-encode all videos in a dataset
fouv.reencode_videos(fo.load_dataset("my-dataset"))
# Or a single file
fouv.reencode_video("/path/to/input.avi", "/path/to/output.mp4")# Temporary (current session only)
ulimit -n 65536
# Permanent — add to your shell profile and reload it
# bash: ~/.bash_profile or ~/.bashrc
# zsh: ~/.zshrc
echo "ulimit -n 65536" >> <your-shell-profile> && source <your-shell-profile>fo.app_config.proxy_url = "http://your-server:<app-port>/proxy/<app-port>"
session = fo.launch_app(dataset)# Use the same port FiftyOne is listening on (default: 5151)
ssh -L <app-port>:localhost:<app-port> user@remote-serverpip install plotly
jupyter labextension install jupyterlab-plotlyimport plotly.offline as pyo
pyo.init_notebook_mode(connected=True)ConnectionFailureServerSelectionTimeoutErrorps aux | grep mongod # is MongoDB running?
df -h # is disk full?pkill -f "fiftyone.*mongod" # kill stale process, then re-import fiftyone// ~/.fiftyone/config.json
{ "database_uri": "mongodb://localhost:27017" }⚠️ Requires explicit user confirmation.
ls -la ~/.fiftyone/ # show what will be deleted
rm -rf ~/.fiftyone/var/ # only after user confirmsfo.list_plugins()
# Via MCP:
list_plugins(enabled=True)
list_operators(builtin_only=False)fo.download_plugin("voxel51/fiftyone-plugins", plugin_names=["@voxel51/brain"])
fo.enable_plugin("@voxel51/brain")
# Via MCP:
download_plugin(url_or_repo="voxel51/fiftyone-plugins", plugin_names=["@voxel51/brain"])
enable_plugin(plugin_name="@voxel51/brain")| Operator prefix | Plugin |
|---|---|
| |
| |
| |
| |
| |
launch_app() # 1. launch app first
# wait 5-10 seconds
execute_operator(...) # 2. then run the operatorwritable = fo.load_dataset("read-only-dataset").clone("my-writable-dataset")
writable.persistent = True# Use views, not full dataset iteration
view = dataset.match({"label": "cat"}).take(1000)
# Bulk updates over per-sample saves
dataset.set_values("my_score", values_list) # fast
# vs: sample["my_score"] = v; sample.save() # slow
# Add indexes for frequently filtered fields
dataset.create_index("ground_truth.detections.label")dataset.reload()
# or
session.dataset = fo.load_dataset("my-dataset")
session.refresh()Cmd+Shift+RCtrl+Shift+Rpip install fiftyone==X.Y.Z
python -c "import fiftyone as fo; fo.migrate_database_if_necessary()"⚠️ Export important datasets before downgrading.
OSError: You must have fiftyone>=X.Y.Z to migrate from vX.Y.Z to vA.B.Cfiftyone# Current env
python -c "import fiftyone as fo; print(fo.__version__, fo.config.database_name)"
# Check if the database is accessible at all
python -c "
import fiftyone as fo
try:
print('datasets:', fo.list_datasets())
except Exception as e:
print('inaccessible:', e)
"
# All Python installs on this machine
which -a python python3 | xargs -I{} sh -c '{} -c "import fiftyone as fo; print(\"{}: \", fo.__version__)" 2>/dev/null'# Find the virtualenv activate script
ACTIVATE=$(python -c "import sys; print(sys.prefix)")/bin/activate
echo $ACTIVATE # confirm before editing
# Append isolation — pick a name that reflects your project
echo '
# Isolate FiftyOne database from other installations
export FIFTYONE_DATABASE_NAME=fiftyone-<your-project>' >> $ACTIVATE
source $ACTIVATE
python -c "import fiftyone as fo; print(fo.config.database_name)"⚠️ After applying this fix, restart any running FiftyOne App or Python processes — env var changes only affect new processes. Check for stale processes:. Confirm with user before killing them.ps aux | grep fiftyone
FIFTYONE_DATABASE_NAME=fiftyone-<your-project> python your_script.pypip install "fiftyone>=X.Y.Z"// ~/.fiftyone/config.json
{ "database_name": "fiftyone-<your-project>" }ConnectionError: Cannot connect to database type 'fiftyone' with client type 'fiftyone-teams'import fiftyone as fo
print(fo.__version__)
print(fo.config.database_name)
print(fo.config.database_uri or "(internal MongoDB)")
try:
fo.list_datasets()
except Exception as e:
print(e)ACTIVATE=$(python -c "import sys; print(sys.prefix)")/bin/activate
echo $ACTIVATE # confirm before editing
echo '
# Isolate FiftyOne database from Teams installation
export FIFTYONE_DATABASE_NAME=fiftyone-<your-project>' >> $ACTIVATE
source $ACTIVATEcat ~/.fiftyone/config.json 2>/dev/null || echo "(no config)"
python -c "import fiftyone as fo; import json; print(json.dumps(fo.config.serialize(), indent=2))"## Issue: <Name>