Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Exception when handling upload error.

オープン
#25 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
52/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
python
領域
api

調査の方向性

appcenter/versions.py の _wait_for_upload から始め、upload_build と upload_and_release から呼び出されるこの処理で、commit の upload response がどのように処理されているかを確認します。zip upload error を再現し、レスポンスの error_details が AttributeError なしで表面化することを確認します。

索引モデルが issue の本文から書いたものです。

説明

I'm encountering an exception when trying to uploading a zip file for a windows artifact.
This is what I'm trying to run:

    client = appcenter.AppCenterClient(access_token=accessToken)
    client.versions.upload_and_release(
        owner_name=ownerName,
        app_name=appName,
        binary_path=artifactFile,       # A zip file that works when uploaded using the site.
        group_id=distributionGroup,     # 00000000-0000-0000-0000-000000000000 (Collaborators)
        release_notes="upload test"
    )

And the issues happen here:

https://github.com/microsoft/appcenter-rest-python/blob/da6955979e251a81e67affacbf3f05813f9b66c7/appcenter/versions.py#L489

This is the exception:

Exception has occurred: AttributeError       (note: full exception trace is shown but execution is paused at: _run_module_as_main)
'CommitUploadResponse' object has no attribute 'get'
  File "C:\Python310\Lib\site-packages\appcenter\versions.py", line 489, in _wait_for_upload
    + response_data.get("error_details", "?")
  File "C:\Python310\Lib\site-packages\appcenter\versions.py", line 624, in upload_build
    upload_end_response = self._wait_for_upload(
  File "C:\Python310\Lib\site-packages\appcenter\versions.py", line 682, in upload_and_release
    release_id = self.upload_build(
  File "C:\Utils\UploadToAppCenter.py", line 72, in main
    client.versions.upload_and_release(
  File "C:\Utils\UploadToAppCenter.py", line 87, in <module>
    main()
  File "C:\Python310\Lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Python310\Lib\runpy.py", line 196, in _run_module_as_main (Current frame)
    return _run_code(code, main_globals, None,
AttributeError: 'CommitUploadResponse' object has no attribute 'get'

The response I'm getting :
b'{"id":"some-guid-A","upload_status":"error","error_details":"A problem occured while extracting your app. (Correlation ID: some-guid-B)"}'

主要言語
Python
スター
25
フォーク
20
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/appcenter-rest-python のほかの issue

microsoft/appcenter-rest-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。