Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors in jet_bridge when transforming 'headers' and 'query_params' #22

Open
boazim opened this issue Apr 7, 2022 · 2 comments
Open

Comments

@boazim
Copy link

boazim commented Apr 7, 2022

The following two line:
headers = dict(map(lambda x: (x['name'], x['value']), headers)) query_params = list(map(lambda x: (x['name'], x['value']), query_params))
Are failing:
File "/packages/jet_bridge_base/jet_bridge_base/serializers/proxy_request.py", line 214, in submit headers = dict(map(lambda x: (x['name'], x['value']), headers)) File "/packages/jet_bridge_base/jet_bridge_base/serializers/proxy_request.py", line 214, in <lambda> headers = dict(map(lambda x: (x['name'], x['value']), headers)) TypeError: byte indices must be integers or slices, not str

@boazim
Copy link
Author

boazim commented Apr 7, 2022

To give more context, this is the value of headers as was captured by the debugger: [b'[{"name":"Content-Type","value":"application/json"}]']

@boazim
Copy link
Author

boazim commented Apr 7, 2022

My local fix: headers = dict(map(lambda x: (x['name'], x['value']), json.loads(headers[0].decode('UTF-8'))))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant