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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'NoneType' object has no attribute 'src' #8

Closed
nauliajati opened this issue Jan 10, 2017 · 16 comments
Closed

AttributeError: 'NoneType' object has no attribute 'src' #8

nauliajati opened this issue Jan 10, 2017 · 16 comments
Assignees

Comments

@nauliajati
Copy link

nauliajati commented Jan 10, 2017

Hello, i got this error when i running > python kickthemout.py
can u help me? thanks 馃槃

File "kickthemout.py", line 291, in <module>
    defaultGatewayIP = getGatewayIP()
  File "kickthemout.py", line 236, in getGatewayIP
    return getGateway_p.src
AttributeError: 'NoneType' object has no attribute 'src'
k4m4 added a commit that referenced this issue Jan 10, 2017
k4m4 added a commit that referenced this issue Jan 10, 2017
k4m4 added a commit that referenced this issue Jan 10, 2017
@k4m4
Copy link
Owner

k4m4 commented Jan 10, 2017

There was a problem while attempting to programmatically obtain the Gateway IP address. We made a few changes to the main script and now allow manual entry for when such errors occur. You should be all set.

@nauliajati
Copy link
Author

nauliajati commented Jan 10, 2017

ok thanks i'll try it.

@k4m4
Copy link
Owner

k4m4 commented Jan 10, 2017

Please let us know if it works or if you are experiencing any further issues.

@AndrewOlsen
Copy link

AndrewOlsen commented Jan 11, 2017

I'm getting an error with as well. I receive this when I run: python2 kickthemout.py

Traceback (most recent call last):
  File "kickthemout.py", line 296, in <module>
    defaultGatewayIP = getGatewayIP()
  File "kickthemout.py", line 239, in getGatewayIP
    print("\n{0}ERROR: Gateway IP could not be obtained. Please enter IP manually.{2}\n").format(RED, END)
IndexError: tuple index out of range

k4m4 added a commit that referenced this issue Jan 11, 2017
@k4m4
Copy link
Owner

k4m4 commented Jan 11, 2017

It should work now. Thanks for notifying us.

@k4m4
Copy link
Owner

k4m4 commented Jan 11, 2017

@AndrewOlsen Please let us know if the issue hasn't been resolved.

@AndrewOlsen
Copy link

AndrewOlsen commented Jan 11, 2017

This issue has been solved thanks. One last thing, if the IP retrieval doesn't work it doesn't inform me until after I enter the keyboard interrupt. Besides that it is working great.

@NikosKokkinis
Copy link

NikosKokkinis commented Jan 12, 2017

Hello, I have the same problem. I get:

ERROR: Gateway IP could not be obtained. Please enter IP manually.

kickthemout> Enter Gateway IP (e.g. 192.168.1.1): 

and when i type my Gateway IP (i use "netstat -r -n") nothing happens

@k4m4
Copy link
Owner

k4m4 commented Jan 12, 2017

So you entered an IP such as 192.168.1.1 and nothing happened, correct? @NickKok

@NikosKokkinis
Copy link

NikosKokkinis commented Jan 12, 2017

Yes, I use netstat to chekh my gateway and then i write it as your example: 192.168.1.1 and nothing happens. Do i have to use quotes?

@k4m4
Copy link
Owner

k4m4 commented Jan 12, 2017

No, you don't have to use quotes. I'll work on it and let you know when the issue is solved. @NickKok

@k4m4
Copy link
Owner

k4m4 commented Jan 12, 2017

Please let me know what OS you are running and what you mean by 'nothing happens'. Does the script stop running? @NickKok

@NikosKokkinis
Copy link

NikosKokkinis commented Jan 12, 2017

I am using linux debian distro. I run the script and then i put the gateway that it asked me and then it finshed and i see the command line again.

@NikosKokkinis
Copy link

NikosKokkinis commented Jan 12, 2017

~/kickthemout $ python kickthemout.py 

ERROR: Gateway IP could not be obtained. Please enter IP manually.

kickthemout> Enter Gateway IP (e.g. 192.168.1.1): 192.168.1.254
 ~/kickthemout $ 

@AndrewOlsen
Copy link

AndrewOlsen commented Jan 12, 2017

The script needs to be run as root.

@NikosKokkinis
Copy link

NikosKokkinis commented Jan 12, 2017

Thanks, I had to run pip install -r requirements.txt as root.

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

No branches or pull requests

5 participants