Open ashley-mv opened 1 year ago
Hmm strange. In order to resolve this error you will have to connect directly to your MongoDB database and delete the duplicate document that has somehow been created in the config
collection of your fiftyone
database.
To do this, start a mongod
server in one shell:
# If you installed from pip, you should have a `mongod` binary here
MONGOD_PATH=/path/to/your/env/lib/python3.8/site-packages/fiftyone/db/bin/mongod
# If you installed from source, it should be here
MONGOD_PATH=~/.fiftyone/bin/mongod
# This is the default location where your database lives on disk
# If you customized your `database_dir` config, use that value here
DB_PATH=~/.fiftyone/var/lib/mongo
# Start mongo sever
$MONGOD_PATH --dbpath $DB_PATH
Then start an interactive shell in another terminal (if you installed from pip, I believe you'll have to install the mongo shell separately):
# If you installed FiftyOne from pip, provide your path here
MONGOS_PATH=/path/to/mongo
# If you installed from source, you should have a `mongo` binary here
MONGOS_PATH=~/.fiftyone/bin/mongo --shell
# Start mongo shell
$MONGOS_PATH --shell
Now delete the duplicate document:
# If you customized your `database_name` config, use that value here. The default is `fiftyone`
> use fiftyone
# You will see two documents here
> db.config.find({})
{ "_id" : ObjectId("XXXXX"), "version" : "0.18.0", "type" : "fiftyone" }
{ "_id" : ObjectId("YYYYY"), "version" : "0.17.2", "type" : "fiftyone" }
# Delete one of the documents
> db.config.deleteOne({"_id": ObjectId("YYYYY")})
System information
Commands to reproduce
Describe the problem
I get this error when I import fiftyone.