Exception when handling upload error.
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 52/100
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:
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/appcenter-rest-python
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
All issues in microsoft/appcenter-rest-python
Similar issues
-
bug confirmed issue
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
open-webui/open-webui#30750 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
OpenwaterHealth/openmotion-bloodflow-app#604 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 90/100