Open vickydhas opened 1 year ago
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
The exception occurs in _submit_stats() method. Just turn off usage stats submission:
api = Api(key_id, path_to_key_file, issuer_id, submit_stats=False)
Inputs in python code:
Output error
I tried doing
pip install time
/pip3 install time
but the module is not found in the pip command.