posit-dev / posit-dev/rsconnect-python
KeyError: 'id' when deploying jupyter notebook
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 37
- フォーク
- 28
- 平均マージ
- 1日 3時間
- マージ済み PR(30日)
- 7
説明
We have a report of a keyerror when deploying a jupyter notebook.
After doing some code reading, it's unclear to me how this could occur if we get a successful response from self.app_create
We'll follow up with additional diagnostic information but I thought we should file an issue here in case others have run into this problem.
rsconnect deploy notebook -v ./snowflake_pythonconnector_demo.ipynb
Connect detected CLI commands and/or environment variables that overlap with stored credential.
Check your environment variables (e.g. CONNECT_API_KEY) to make sure you want them to be used.
Credential paremeters are taken with the following precedence: stored > CLI > environment.
To ignore an environment variable, override it in the CLI with an empty string (e.g. -k '').
Validating server... [OK]
Validating app mode... [OK]
Making bundle ...[VERBOSE] 2023-11-02T09:43:20-0500 Adding file: manifest.json
[VERBOSE] 2023-11-02T09:43:20-0500 Adding file: requirements.txt
[VERBOSE] 2023-11-02T09:43:20-0500 Adding file: ./snowflake_pythonconnector_demo.ipynb
[OK]
Deploying bundle ... [ERROR]: 'id'
Traceback (most recent call last):
File "/Users/user/.pyenv/versions/3.9.15/lib/python3.9/site-packages/rsconnect/main.py", line 96, in wrapper
result = func(*args, **kwargs)
File "/Users/user/.pyenv/versions/3.9.15/lib/python3.9/site-packages/rsconnect/main.py", line 901, in deploy_notebook
ce.deploy_bundle().save_deployed_info().emit_task_log()
File "/Users/user/.pyenv/versions/3.9.15/lib/python3.9/site-packages/rsconnect/log.py", line 189, in wrapper
result = method(self, *args, **kw)
File "/Users/user/.pyenv/versions/3.9.15/lib/python3.9/site-packages/rsconnect/api.py", line 712, in deploy_bundle
result = self.client.deploy(
File "/Users/user/.pyenv/versions/3.9.15/lib/python3.9/site-packages/rsconnect/api.py", line 257, in deploy
app_id = app["id"]
KeyError: 'id'
Internal error: 'id'
Is it possible there's 2 api keys in play as a result of the environment var being different than the api key from the cache?
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
rsconnect/api.py の253-257行目と、712行目の deploy_bundle 呼び出しから始め、rsconnect deploy notebook -v ./snowflake_pythonconnector_demo.ipynb で問題を再現します。self.app_create が返すレスポンスと credential context を調査します。レスポンスに id がない理由を特定し、明確な処理または診断の手順を示せれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- jupyter-notebook, python
- 領域
- cli
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100