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

SyntaxWarning: "is not" with a literal. Did you mean "!="? #82

Open
jack3841 opened this issue Aug 14, 2022 · 4 comments
Open

SyntaxWarning: "is not" with a literal. Did you mean "!="? #82

jack3841 opened this issue Aug 14, 2022 · 4 comments

Comments

@jack3841
Copy link

upon running the command, I am getting below errors

python3 cloudfail.py --target seo.com
/home/kali/CloudFail/cloudfail.py:180: SyntaxWarning: "is not" with a literal. Did you mean "!="?
while choice is not 'y' and choice is not 'n':
/home/kali/CloudFail/cloudfail.py:180: SyntaxWarning: "is not" with a literal. Did you mean "!="?
while choice is not 'y' and choice is not 'n':
/home/kali/CloudFail/cloudfail.py:180: SyntaxWarning: "is not" with a literal. Did you mean "!="?
while choice is not 'y' and choice is not 'n':
/home/kali/CloudFail/cloudfail.py:180: SyntaxWarning: "is not" with a literal. Did you mean "!="?
while choice is not 'y' and choice is not 'n':
/home/kali/CloudFail/cloudfail.py:182: SyntaxWarning: "is" with a literal. Did you mean "=="?
if choice is 'y':
Traceback (most recent call last):
File "/home/kali/CloudFail/cloudfail.py", line 9, in
import socks
File "/home/kali/CloudFail/socks.py", line 62, in
from collections import Callable
ImportError: cannot import name 'Callable' from 'collections' (/usr/lib/python3.10/collections/init.py)
~}}

@benborges
Copy link

Same, on arch, python3, requirements installed fine

@Aholicknight
Copy link

Having the same error, did anyone find a fix?

@Fojx
Copy link

Fojx commented Aug 24, 2022

Hello, if you are using python3 then you can fix this by with edit socks.py file.
You need to change the line 62

Replace this "from collections import Callable"
with this "from collections.abc import Callable"

Or just run this sed -i 's/from collections import Callable/from collections.abc import Callable/g' socks.py

But please, remember this is temporary solution, Zamanry has an open PR about this, so when this pr will merge you can just pull this

@Aholicknight
Copy link

Hello, if you are using python3 then you can fix this by with edit socks.py file. You need to change the line 62

Replace this "from collections import Callable" with this "from collections.abc import Callable"

@Fojx Thank you for your comment. After some time tinkering around, it now works, even with GitHub actions.

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

4 participants