{"record":{"id":"b3ed544168e77094","repo":"vllm-project/vllm","slug":"ec-connect-must-not-be-none","errorCode":null,"errorMessage":"EC connect must not be None","messagePattern":"EC connect must not be None","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"vllm/distributed/ec_transfer/ec_connector/factory.py","lineNumber":65,"sourceCode":"            connector_cls.__name__,\n            ec_transfer_config.engine_id,\n        )\n        # Connector is explicitly separated into two roles.\n        # Scheduler connector:\n        # - Co-locate with scheduler process\n        # - Should only be used inside the Scheduler class\n        # Worker connector:\n        # - Co-locate with worker process\n        return connector_cls(config, role)\n\n    @classmethod\n    def get_connector_class(\n        cls, ec_transfer_config: \"ECTransferConfig\"\n    ) -> type[ECConnectorBase]:\n        \"\"\"Get the connector class by name.\"\"\"\n        connector_name = ec_transfer_config.ec_connector\n        if connector_name is None:\n            raise ValueError(\"EC connect must not be None\")\n        elif connector_name in cls._registry:\n            connector_cls = cls._registry[connector_name]()\n        else:\n            connector_module_path = ec_transfer_config.ec_connector_module_path\n            if connector_module_path is None:\n                raise ValueError(f\"Unsupported connector type: {connector_name}\")\n            connector_module = importlib.import_module(connector_module_path)\n            connector_cls = getattr(connector_module, connector_name)\n        return connector_cls\n\n\n# Register various connectors here.\n# The registration should not be done in each individual file, as we want to\n# only load the files corresponding to the current connector.\n\nECConnectorFactory.register_connector(\n    \"ECExampleConnector\",\n    \"vllm.distributed.ec_transfer.ec_connector.example_connector\",","sourceCodeStart":47,"sourceCodeEnd":83,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/vllm/distributed/ec_transfer/ec_connector/factory.py#L47-L83","documentation":"get_connector_class() resolves which class to instantiate from ec_transfer_config.ec_connector. A None connector name means the config exists but no connector was chosen, and there is no default to fall back to, so it raises ValueError (the message has a small typo: 'EC connect' instead of 'EC connector').","triggerScenarios":"Creating an ECTransferConfig with ec_connector unset/None but still calling create_connector; constructing the config for its consumer/producer role flags only and accidentally entering connector creation; config parsing that drops an empty --ec-connector value to None.","commonSituations":"Setting only ec_cpu_bytes/role flags in extra config while forgetting the connector name; programmatic configs built field-by-field that skip ec_connector.","solutions":["Set ec_connector on ECTransferConfig to a registered name (e.g. 'ECExampleConnector') or a class name resolvable via ec_connector_module_path","Validate the config early: assert ec_transfer_config.ec_connector before entering the EC path","For custom connectors, also set ec_connector_module_path so the fallback import works"],"exampleFix":"# before\nECTransferConfig(is_ec_producer=True)  # ec_connector is None\n# ValueError: EC connect must not be None\n\n# after\nECTransferConfig(is_ec_producer=True, ec_connector=\"ECExampleConnector\")","handlingStrategy":"validation","validationCode":"name = ec_transfer_config.ec_connector\nassert name, \"set ec_transfer_config.ec_connector before creating a connector\"","typeGuard":"def has_connector_name(ec_transfer_config) -> bool:\n    return ec_transfer_config.ec_connector is not None","tryCatchPattern":null,"preventionTips":["Always set ec_connector when constructing ECTransferConfig for real use","Validate required EC fields in one place at startup","Add a config schema check that rejects None connector names on the EC path"],"tags":["configuration","ec-transfer","factory"],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}