You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/Users/***/Library/***/Python/api_user_2/env3.9/lib/python3.9/site-packages/requests/utils.py", line 1024, in check_header_validity
if not pat.match(value):
TypeError: expected string or bytes-like object
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/***/Library/***/Python/api_user_2/api_user_2.py", line 13, in <module>
mydims = mycompany.getDimensions('***')
File "/Users/***/Library/***/Python/api_user_2/env3.9/lib/python3.9/site-packages/aanalytics2/aanalytics2.py", line 571, in getDimensions
dims = self.connector.getData(self.endpoint_company +
File "/Users/***/Library/***/Python/api_user_2/env3.9/lib/python3.9/site-packages/aanalytics2/connector.py", line 84, in getData
res = requests.get(
File "/Users/***/Library/***/Python/api_user_2/env3.9/lib/python3.9/site-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/Users/***/Library/***/Python/api_user_2/env3.9/lib/python3.9/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/Users/***/Library/***/Python/api_user_2/env3.9/lib/python3.9/site-packages/requests/sessions.py", line 515, in request
prep = self.prepare_request(req)
File "/Users/***/Library/***/Python/api_user_2/env3.9/lib/python3.9/site-packages/requests/sessions.py", line 443, in prepare_request
p.prepare(
File "/Users/***/Library/***/Python/api_user_2/env3.9/lib/python3.9/site-packages/requests/models.py", line 319, in prepare
self.prepare_headers(headers)
File "/Users/***/Library/***/Python/api_user_2/env3.9/lib/python3.9/site-packages/requests/models.py", line 453, in prepare_headers
check_header_validity(header)
File "/Users/***/Library/***/Python/api_user_2/env3.9/lib/python3.9/site-packages/requests/utils.py", line 1027, in check_header_validity
raise InvalidHeader("Value for header {%s: %s} must be of type str or "
requests.exceptions.InvalidHeader: Value for header {x-proxy-global-company-id: [{'globalCompanyId': ‘***’, 'companyName': ‘***’, 'apiRateLimitPolicy': 'aa_api_tier10_tp', 'dpc': 'lon'}]} must be of type str or bytes, not <class 'list'>
Process finished with exit code 1
aanalytics2 is latest version
Python 3.9.13 in virtual environment
JWT authentication with config.json file used for credentials
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi guys,
Any idea why I'm getting the below?
aanalytics2 is latest version
Python 3.9.13 in virtual environment
JWT authentication with config.json file used for credentials
Thank you,
Vlad
Beta Was this translation helpful? Give feedback.
All reactions