Ponytech / appstoreconnectapi

Python wrapper around Apple App Store Api
https://ponytech.net/projects/app-store-connect
MIT License
161 stars 74 forks source link

When listing provisioning files I cannot acces the bundleId #43

Closed blesliecan closed 2 years ago

blesliecan commented 2 years ago

for pro in api.list_profiles(): print(pro.bundleId)

results in: File "appletest.py", line 48, in print(pro.bundleId) File "/Users/leslie/.pyenv/versions/3.7.7/lib/python3.7/site-packages/appstoreconnect/resources.py", line 16, in getattr if item in self.relationships: File "/Users/leslie/.pyenv/versions/3.7.7/lib/python3.7/site-packages/appstoreconnect/resources.py", line 16, in getattr if item in self.relationships: File "/Users/leslie/.pyenv/versions/3.7.7/lib/python3.7/site-packages/appstoreconnect/resources.py", line 16, in getattr if item in self.relationships: [Previous line repeated 496 more times] RecursionError: maximum recursion depth exceeded

ppawlak commented 2 years ago

Hi @blesliecan

Thanks for reporting this issue. It doesn't seem that bundleId is a valid field on the Profile resource. See: https://developer.apple.com/documentation/appstoreconnectapi/profile/attributes

It should not raise a RecursionError though, but an AttributeError. I'll fix this.

blesliecan commented 2 years ago

You are right, the bundeId in under profile relationships: https://developer.apple.com/documentation/appstoreconnectapi/profile/relationships.

ppawlak commented 2 years ago

I made the fix to return the proper error message and just released version 0.10.0