# Troubleshooting the Python client

> Troubleshooting the Python client - Review cases that can cause issues with using the Python client
> and known fixes.

This Markdown file sits beside the HTML page at the same path (with a `.md` suffix). It summarizes the topic and lists links for tools and LLM context.

Companion generated at `2026-04-24T16:03:56.296262+00:00` (UTC).

## Primary page

- [Troubleshooting the Python client](https://docs.datarobot.com/en/docs/api/dev-learning/python/py-help.html): Full documentation for this topic (HTML).

## Sections on this page

- [InsecurePlatformWarning](https://docs.datarobot.com/en/docs/api/dev-learning/python/py-help.html#insecureplatformwarning): In-page section heading.
- [Unable to retrieve multiclass metrics](https://docs.datarobot.com/en/docs/api/dev-learning/python/py-help.html#unable-to-retrieve-multiclass-metrics): In-page section heading.
- [AttributeError: 'EntryPoint' object has no attribute 'resolve'](https://docs.datarobot.com/en/docs/api/dev-learning/python/py-help.html#attributeerror-entrypoint-object-has-no-attribute-resolve): In-page section heading.
- [Connection errors](https://docs.datarobot.com/en/docs/api/dev-learning/python/py-help.html#connection-errors): In-page section heading.
- [ConnectTimeout](https://docs.datarobot.com/en/docs/api/dev-learning/python/py-help.html#connecttimeout): In-page section heading.
- [project.open_leaderboard_browser](https://docs.datarobot.com/en/docs/api/dev-learning/python/py-help.html#project-open-leaderboard-browser): In-page section heading.

## Related documentation

- [Developer documentation](https://docs.datarobot.com/en/docs/api/index.html): Linked from this page.
- [Developer learning](https://docs.datarobot.com/en/docs/api/dev-learning/index.html): Linked from this page.
- [Python API client user guide](https://docs.datarobot.com/en/docs/api/dev-learning/python/index.html): Linked from this page.

## Documentation content

# Troubleshooting the Python client

This page outlines cases that can cause issues with using the Python client and provides known fixes.

### InsecurePlatformWarning

Python versions earlier than 2.7.9 might report an [InsecurePlatformWarning](https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning) in your output.
To prevent this warning without updating your Python version, you should install the [pyOpenSSL](https://urllib3.readthedocs.org/en/latest/security.html#pyopenssl) package:

`pip install pyopenssl ndg-httpsclient pyasn1`

### Unable to retrieve multiclass metrics

The Python client does not compute the confusion matrix metrics for multiclass projects with more than 100 target classes.
That is, the metrics object typically obtained using `get_confusion_chart().class_metrics` (as shown in [the API documentation](https://datarobot-public-api-client.readthedocs-hosted.com/en/latest-release/autodoc/api_reference.html?highlight=get_confusion_chart#datarobot.models.BlenderModel.get_confusion_chart)) is empty in such cases.
In order to retrieve these metrics, DataRobot recommends using [this code snippet](https://gist.github.com/Templarrr/e40059c00b7d65f1f2c04f85ebb44c17).

### AttributeError: 'EntryPoint' object has no attribute 'resolve'

Some earlier versions of [setuptools](https://setuptools.pypa.io/en/latest/) cause an error when importing DataRobot.

```
>>> import datarobot as dr
...
File "/home/clark/.local/lib/python2.7/site-packages/trafaret/__init__.py", line 1550, in load_contrib
  trafaret_class = entrypoint.resolve()
AttributeError: 'EntryPoint' object has no attribute 'resolve'
```

The recommended fix is upgrading setuptools to the latest version.

`pip install --upgrade setuptools`

If you are unable to upgrade, pin [trafaret](https://pypi.python.org/pypi/trafaret/) to version <=7.4 to correct this issue.

### Connection errors

`configuration.rst` describes how to configure the DataRobot client with the `max_retries` parameter to fine tune behaviors like the number of attempts to retry failed connections.

### ConnectTimeout

If you have a slow connection to your DataRobot installation, you may see a traceback like:

```
ConnectTimeout: HTTPSConnectionPool(host='my-datarobot.com', port=443): Max
retries exceeded with url: /api/v2/projects/
(Caused by ConnectTimeoutError(<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f130fc76150>,
'Connection to my-datarobot.com timed out. (connect timeout=6.05)'))
```

### project.open_leaderboard_browser

Calling `project.open_leaderboard_browser` may be blocked if you run it with a text-mode browser or on a server that doesn't have the ability to open a browser.
