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

'str' object does not support item assignment in mitmproxy2swagger.py #25

Open
krishna760 opened this issue Feb 18, 2023 · 1 comment
Open

Comments

@krishna760
Copy link

└─$ pip install --no-cache-dir mitmproxy2swagger
Successfully installed mitmproxy2swagger-0.8.0
└─$ mitmproxy2swagger -i Downloads/flows -o spec.yml -p http://google.com
Traceback (most recent call last):
File "/home/krish500/.local/bin/mitmproxy2swagger", line 8, in
sys.exit(main())
^^^^^^
File "/home/krish500/.local/lib/python3.11/site-packages/mitmproxy2swagger/mitmproxy2swagger.py", line 98, in main
swagger['servers'] = []
~~~~~~~^^^^^^^^^^^
TypeError: 'str' object does not support item assignment
└─$ uname -a
Linux DESKTOP-18BPFD5 5.15.79.1-microsoft-standard-WSL2 #1 SMP Wed Nov 23 01:01:46 UTC 2022 x86_64 GNU/Linux
$ mitmweb --version
Mitmproxy: 9.0.1
Python: 3.11.1
OpenSSL: OpenSSL 3.0.7 1 Nov 2022
Platform: Linux-5.15.79.1-microsoft-standard-WSL2-x86_64-with-glibc2.36
─$ python3 --version
Python 3.11.1

@jrgdiaz
Copy link

jrgdiaz commented Mar 9, 2023

Make sure you are pointing to a .yml file when specifying the output (-o)
That fixed it for me

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

2 participants