Closed safdar-aneela closed 2 years ago
Looks like httpx edited their allow_redirects param to follow_redirects : https://github.com/encode/httpx/blob/e1abaf146fe1b66c0d5ae10a24106865efe2d79e/httpx/_api.py#L175
If you have vscode, can you try find and replace all occurences of "allow_redirects" by "follow_redirects", and then re-run ?
And if it works, can you push a PR ? :)
Now its giving me error again with replaced argument.
Traceback (most recent call last): File "/home/kali/Downloads/GHunt-master/check_and_gen.py", line 175, in <module> html = get_authorization_source(cookies) File "/home/kali/Downloads/GHunt-master/check_and_gen.py", line 38, in get_authorization_source req = httpx.get("https://docs.google.com/document/u/0/?usp=direct_url", TypeError: get() got an unexpected keyword argument 'follow_redirects'
@mxrch had a question regarding this. Do we even need to use the follow_redirects
parameter explicitly anymore? There are currently two instances of allow_redirects
both set to false and if we are migrating to the newer follow_redirect
then the official documentation states that it is false by default.
@mxrch had a question regarding this. Do we even need to use the
follow_redirects
parameter explicitly anymore? There are currently two instances ofallow_redirects
both set to false and if we are migrating to the newerfollow_redirect
then the official documentation states that it is false by default.
Nice catch ! This is a good solution but most people will just update GHunt by doing a git pull
and will not upgrading their modules, and there will be many issues like "unexpected keyword argument allow_redirects"
So I think we'll do this but I'll add a function that will check if all hardcoded modules versions in the requirements.txt are installed.
And we'll let all the modules in the requirements.txt like they already are, but we'll just set the last httpx version as the minimum required version.
With that, we can patch the code AND update the librairies for everyone.
I think it's the best way to do it, force the user to upgrade their librairies, rather than patching the code and letting old users with old versions and not understanding the problem because it does not run anymore, or hardcoding the older httpx version.
Any update regarding issue?
I am having the same error , any idea how to fix it??
The patch should be up tomorrow ! I'm fixing other things too.
It should be fixed in https://github.com/mxrch/GHunt/commit/4601d75d6bb12c33a605a7ac5bf88e151e9ba3d3, don't hesitate to re-open the issue if needed.
I am getting following error while saving cookies in check_and_gen.py. My python version is 3.9.2.
Traceback (most recent call last): File "/home/kali/Downloads/GHunt-master/check_and_gen.py", line 175, in <module> html = get_authorization_source(cookies) File "/home/kali/Downloads/GHunt-master/check_and_gen.py", line 38, in get_authorization_source req = httpx.get("https://docs.google.com/document/u/0/?usp=direct_url", TypeError: get() got an unexpected keyword argument 'allow_redirects'