# Pythonクライアントのトラブルシューティング

> Pythonクライアントのトラブルシューティング - Pythonクライアントの使用で問題が発生する可能性があるケースと、既知の修正方法を確認します。

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-07-15T05:55:44.639253+00:00` (UTC).

## Primary page

- [Pythonクライアントのトラブルシューティング](https://docs.datarobot.com/ja/docs/api/dev-learning/python/py-help.html.md): Full documentation for this topic (Markdown sidecar).

## Sections on this page

- [InsecurePlatformWarning](https://docs.datarobot.com/ja/docs/api/dev-learning/python/py-help.html.md#insecureplatformwarning): In-page section heading.
- [多クラス指標を取得できない](https://docs.datarobot.com/ja/docs/api/dev-learning/python/py-help.html.md#unable-to-retrieve-multiclass-metrics): In-page section heading.
- [AttributeError：'EntryPoint'オブジェクトに属性'resolve'がない](https://docs.datarobot.com/ja/docs/api/dev-learning/python/py-help.html.md#attributeerror-entrypoint-object-has-no-attribute-resolve): In-page section heading.
- [接続エラー](https://docs.datarobot.com/ja/docs/api/dev-learning/python/py-help.html.md#connection-errors): In-page section heading.
- [ConnectTimeout](https://docs.datarobot.com/ja/docs/api/dev-learning/python/py-help.html.md#connecttimeout): In-page section heading.
- [project.open_leaderboard_browser](https://docs.datarobot.com/ja/docs/api/dev-learning/python/py-help.html.md#project-open-leaderboard-browser): In-page section heading.

## Documentation content

このページでは、Pythonクライアントの使用で問題が発生する可能性があるケースの概要と、既知の修正方法について説明します。

### InsecurePlatformWarning

2.7.9以前のPythonバージョンでは、出力の際に [InsecurePlatformWarning](https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning) を報告する可能性があります。
Pythonバージョンを更新せずにこの注意を表示しないようにするためには、 [pyOpenSSL](https://urllib3.readthedocs.org/en/latest/security.html#pyopenssl) パッケージをインストールする必要があります。

`pip install pyopenssl ndg-httpsclient pyasn1`

### 多クラス指標を取得できない

Pythonクライアントは、ターゲットクラスが100を超える多クラスプロジェクトでは、混同行列の指標を計算しません。
つまり、 `get_confusion_chart().class_metrics` （ [APIドキュメント](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) を参照）を使って通常得られる指標オブジェクトは、このような場合は空です。
これらの指標を取得するには、 [このコードスニペット](https://gist.github.com/Templarrr/e40059c00b7d65f1f2c04f85ebb44c17) を使用することをお勧めします。

### AttributeError：'EntryPoint'オブジェクトに属性'resolve'がない

以前のバージョンの [setuptools](https://setuptools.pypa.io/en/latest/) では、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' 
```

推奨される修正方法は、setuptoolsを最新バージョンにアップグレードすることです。

`pip install --upgrade setuptools`

アップグレードできない場合は、 [trafaret](https://pypi.python.org/pypi/trafaret/) をバージョン<=7.4に固定してこの問題を修正します。

### 接続エラー

`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

DataRobotインストールへの接続が遅い場合、次のようなトレースバックが表示される可能性があります。

```
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)')) 
```

設定ファイルで、または `datarobot.Client` の呼び出し時に、 `connect_timeout` 値を使用して、より長い接続タイムアウトを設定すること（中止する前にDataRobotサーバーへの接続を試みる各リクエストでの待機時間を増やすこと）ができます。

### 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.
