You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Doesn't import fiftyone library. Error appears. See below
Code to reproduce issue
import fiftyone as fo
Other info/logs
In [4]: import fiftyone as fo
---------------------------------------------------------------------------
ServerSelectionTimeoutError Traceback (most recent call last)
File /usr/local/lib/python3.8/dist-packages/fiftyone/core/odm/database.py:286, in _validate_db_version(config, client)
285 try:
--> 286 version = Version(client.server_info()["version"])
287 except Exception as e:
File /usr/local/lib/python3.8/dist-packages/pymongo/mongo_client.py:1805, in MongoClient.server_info(self, session)
1794 """Get information about the MongoDB server we're connected to.
1795
1796 :Parameters:
(...)
1801 Added ``session`` parameter.
1802 """
1803 return cast(
1804 dict,
-> 1805 self.admin.command(
1806 "buildinfo", read_preference=ReadPreference.PRIMARY, session=session
1807 ),
1808 )
File /usr/local/lib/python3.8/dist-packages/pymongo/_csot.py:105, in apply.<locals>.csot_wrapper(self, *args, **kwargs)
104 return func(self, *args, **kwargs)
--> 105 return func(self, *args, **kwargs)
File /usr/local/lib/python3.8/dist-packages/pymongo/database.py:805, in Database.command(self, command, value, check, allowable_errors, read_preference, codec_options, session, comment, **kwargs)
804 read_preference = (session and session._txn_read_preference()) or ReadPreference.PRIMARY
--> 805 with self.__client._socket_for_reads(read_preference, session) as (
806 sock_info,
807 read_preference,
808 ):
809 return self._command(
810 sock_info,
811 command,
(...)
818 **kwargs,
819 )
File /usr/local/lib/python3.8/dist-packages/pymongo/mongo_client.py:1296, in MongoClient._socket_for_reads(self, read_preference, session)
1295 _ = self._get_topology()
-> 1296 server = self._select_server(read_preference, session)
1297 return self._socket_from_server(read_preference, server, session)
File /usr/local/lib/python3.8/dist-packages/pymongo/mongo_client.py:1257, in MongoClient._select_server(self, server_selector, session, address)
1256 else:
-> 1257 server = topology.select_server(server_selector)
1258 return server
File /usr/local/lib/python3.8/dist-packages/pymongo/topology.py:272, in Topology.select_server(self, selector, server_selection_timeout, address)
271 """Like select_servers, but choose a random server if several match."""
--> 272 server = self._select_server(selector, server_selection_timeout, address)
273 if _csot.get_timeout():
File /usr/local/lib/python3.8/dist-packages/pymongo/topology.py:261, in Topology._select_server(self, selector, server_selection_timeout, address)
260 def _select_server(self, selector, server_selection_timeout=None, address=None):
--> 261 servers = self.select_servers(selector, server_selection_timeout, address)
262 if len(servers) == 1:
File /usr/local/lib/python3.8/dist-packages/pymongo/topology.py:223, in Topology.select_servers(self, selector, server_selection_timeout, address)
222 with self._lock:
--> 223 server_descriptions = self._select_servers_loop(selector, server_timeout, address)
225 return [self.get_server_by_address(sd.address) for sd in server_descriptions]
File /usr/local/lib/python3.8/dist-packages/pymongo/topology.py:238, in Topology._select_servers_loop(self, selector, timeout, address)
237 if timeout == 0 or now > end_time:
--> 238 raise ServerSelectionTimeoutError(
239 "%s, Timeout: %ss, Topology Description: %r"
240 % (self._error_message(selector), timeout, self.description)
241 )
243 self._ensure_opened()
ServerSelectionTimeoutError: localhost:27017: [Errno 111] Connection refused, Timeout: 30s, Topology Description: <TopologyDescription id: 6465fa245b2bf43049aff6dd, topology_type: Unknown, servers: [<ServerDescription ('localhost', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('localhost:27017: [Errno 111] Connection refused')>]>
The above exception was the direct cause of the following exception:
ConnectionError Traceback (most recent call last)
Cell In[4], line 1
----> 1 import fiftyone as fo
File /usr/local/lib/python3.8/dist-packages/fiftyone/__init__.py:25
21 import fiftyone.constants as _foc
23 __version__ = _foc.VERSION
---> 25 from fiftyone.__public__ import *
27 import fiftyone.core.uid as _fou
28 import fiftyone.core.logging as _fol
File /usr/local/lib/python3.8/dist-packages/fiftyone/__public__.py:15
12 annotation_config = _foc.load_annotation_config()
13 app_config = _foc.load_app_config()
---> 15 _foo.establish_db_conn(config)
17 from .core.aggregations import (
18 Aggregation,
19 Bounds,
(...)
31 Values,
32 )
33 from .core.collections import SaveContext
File /usr/local/lib/python3.8/dist-packages/fiftyone/core/odm/database.py:214, in establish_db_conn(config)
209 raise error
211 _client = pymongo.MongoClient(
212 **_connection_kwargs, appname=foc.DATABASE_APPNAME
213 )
--> 214 _validate_db_version(config, _client)
216 # Register cleanup method
217 atexit.register(_delete_non_persistent_datasets_if_allowed)
File /usr/local/lib/python3.8/dist-packages/fiftyone/core/odm/database.py:289, in _validate_db_version(config, client)
287 except Exception as e:
288 if isinstance(e, ServerSelectionTimeoutError):
--> 289 raise ConnectionError("Could not connect to `mongod`") from e
291 raise RuntimeError("Failed to validate `mongod` version") from e
293 if config.database_validation and version < foc.MIN_MONGODB_VERSION:
ConnectionError: Could not connect to `mongod
What areas of FiftyOne does this bug affect?
[ X] App: FiftyOne application issue
Core: Core Python library issue
Server: FiftyOne server issue
Willingness to contribute
The FiftyOne Community encourages bug fix contributions. Would you or another member of your organization be willing to contribute a fix for this bug to the FiftyOne codebase?
Yes. I can contribute a fix for this bug independently
[X ] Yes. I would be willing to contribute a fix for this bug with guidance from the FiftyOne community
No. I cannot contribute a bug fix at this time
The text was updated successfully, but these errors were encountered:
Instructions
System information
Container from image building Dockerfile in this project.
Commands to reproduce
Execute ipython (Jus as CMD of Dockerfile does)
Describe the problem
Doesn't import fiftyone library. Error appears. See below
Code to reproduce issue
import fiftyone as fo
Other info/logs
What areas of FiftyOne does this bug affect?
App
: FiftyOne application issueCore
: Core Python library issueServer
: FiftyOne server issueWillingness to contribute
The FiftyOne Community encourages bug fix contributions. Would you or another member of your organization be willing to contribute a fix for this bug to the FiftyOne codebase?
The text was updated successfully, but these errors were encountered: