Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Exception when handling upload error.

Open
#25 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
52/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
python
Domain
api

Research direction

Start in appcenter/versions.py at _wait_for_upload, called by upload_build and upload_and_release, and inspect how the commit upload response is handled. Reproduce the zip upload error and verify that the response's error_details is surfaced without an AttributeError.

Written by the indexing model from the issue text.

Description

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)"}'

Dominant language
Python
Stars
25
Forks
20
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/appcenter-rest-python

All issues in microsoft/appcenter-rest-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.