Invite user giving the API error - new to this library so its basic usage question
vickydhas opened this issue · comments
Inputs in python code:
any API called as per readme file
Output error
Exception ignored in: <function Api.__del__ at 0x1051eb790>
Traceback (most recent call last):
File "//user-path...//env/lib/python3.9/site-packages/appstoreconnect/api.py", line 72, in __del__
File "//user-path...//env/lib/python3.9/site-packages/appstoreconnect/api.py", line 333, in _submit_stats
File "//user-path...//env/lib/python3.9/site-packages/requests/api.py", line 115, in post
File "//user-path...//env/lib/python3.9/site-packages/requests/api.py", line 59, in request
File "//user-path...//env/lib/python3.9/site-packages/requests/sessions.py", line 587, in request
File "//user-path...//env/lib/python3.9/site-packages/requests/sessions.py", line 701, in send
File "//user-path...//env/lib/python3.9/site-packages/requests/adapters.py", line 489, in send
File "//user-path...//env/lib/python3.9/site-packages/urllib3/connectionpool.py", line 703, in urlopen
File "//user-path...//env/lib/python3.9/site-packages/urllib3/connectionpool.py", line 386, in _make_request
File "//user-path...//env/lib/python3.9/site-packages/urllib3/connectionpool.py", line 1042, in _validate_conn
File "//user-path...//env/lib/python3.9/site-packages/urllib3/connection.py", line 380, in connect
ModuleNotFoundError: import of time halted; None in sys.modules
I tried doing pip install time
/ pip3 install time
but the module is not found in the pip command.
% pip3 install time --upgrade
ERROR: Could not find a version that satisfies the requirement time (from versions: none)
ERROR: No matching distribution found for time
WARNING: There was an error checking the latest version of pip.
I tried doing pip install time
Time is a Python built-in package, you don't need to install it.
It looks like there is something wrong with your Python installation but I can't tell what.
From the the traceback I can tell the issue arise in the _submit_stats
function, you can disable anonymous data collection by initializing the with api = Api(key_id, path_to_key_file, issuer_id, submit_stats=False)
. It may help.
I'm having this issue right now
code:
from appstoreconnect import Api, UserRole
api = Api(KEY_ID, '.data/appstore_auth.p8', ISSUER_ID)
error:
Exception ignored in: <function Api.__del__ at 0x7fed55845360>
Traceback (most recent call last):
File "/home/ubuntu/mycode/.venv/lib/python3.10/site-packages/appstoreconnect/api.py", line 72, in __del__
File "/home/ubuntu/mycode/.venv/lib/python3.10/site-packages/appstoreconnect/api.py", line 333, in _submit_stats
File "/home/ubuntu/mycode/.venv/lib/python3.10/site-packages/requests/api.py", line 115, in post
File "/home/ubuntu/mycode/.venv/lib/python3.10/site-packages/requests/api.py", line 59, in request
File "/home/ubuntu/mycode/.venv/lib/python3.10/site-packages/requests/sessions.py", line 589, in request
File "/home/ubuntu/mycode/.venv/lib/python3.10/site-packages/requests/sessions.py", line 703, in send
File "/home/ubuntu/mycode/.venv/lib/python3.10/site-packages/requests/adapters.py", line 486, in send
File "/home/ubuntu/mycode/.venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 714, in urlopen
File "/home/ubuntu/mycode/.venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 403, in _make_request
File "/home/ubuntu/mycode/.venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1053, in _validate_conn
File "/home/ubuntu/mycode/.venv/lib/python3.10/site-packages/urllib3/connection.py", line 385, in connect
ModuleNotFoundError: import of time halted; None in sys.modules