Open stevemac007 opened 4 years ago
Great idea 👍
When trying this branch to debug my own problem related I guess to #179 I get
ERROR:root:write() argument must be str, not bytes
Traceback (most recent call last):
File "/home/vide/tmp/aws-google-auth/aws_google_auth/__init__.py", line 79, in cli
process_auth(args, config)
File "/home/vide/tmp/aws-google-auth/aws_google_auth/__init__.py", line 243, in process_auth
google_client.do_login()
File "/home/vide/tmp/aws-google-auth/aws_google_auth/google.py", line 188, in do_login
sess = self.get(self.login_url)
File "/home/vide/tmp/aws-google-auth/aws_google_auth/google.py", line 123, in get
out.write(response.text.encode('utf-8'))
TypeError: write() argument must be str, not bytes
but if I print before on stdout response.text
I do see the HTML
@vide if you drop .encode('utf-8')
from these lines:
and
Does the error persist?
@jack1902 yeah removing the encode('utf-8')
works, I tried it before reporting but only on L122 and then I didn't see it was complaining about L100. Removing it in both places works as expected, I get the files saved to disk
wondering if using the -l
/--log
level would be better to reduce the number of flags the tool has?
I tend to use --log debug --save-failure-html
together when debugging. Wondering what others think?
Add logic to trap all GET and POST calls for debug purposes.