Scoutdrago3

Trouble Shooting

Jul 22nd, 2015
494
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.53 KB | None | 0 0
  1. [Glyph Asks whether I have tried turning off my Firewall, as that may be an issue]
  2.  
  3. I have tried completely turning off my firewall with no luck. I'll try again right now and see if anything changes. Thanks for the input. EDIT: Just tried running again after turning off the firewall, the reactor still refuses to import and the same error is returned. – Scoutdrago3 Jul 13 at 7:44
  4.  
  5.  
  6. Do you have an entry in C:\Windows\System32\Drivers\etc\hosts that points localhost at something other than 127.0.0.1, perhaps? Can you connect to other locally bound ports using other programs? Is python.exe restricted from performing networking entirely somehow? – Glyph Jul 14 at 10:29
  7.  
  8.  
  9. At a python prompt, does socket.socketpair() work? – Glyph Jul 14 at 10:30
  10.  
  11. For your first comment, this is my file. Everything in there is 127.0.0.1. Also, none of my addresses (IPs) are 127.0.0.1, so I'm not sure why these are 127.0.0.1. And for your second comment, no, socket.socketpair() does not work. Returns an AttributeError and says that it's not a part of the socket module. And lastly, I'm running Python 2.7. – Scoutdrago3 Jul 14 at 22:46
  12.  
  13.  
  14. I think there might be a bug in Twisted here, but I'm not sure why your system is hitting this code path. You should probably remove those entries from your hosts file (on a new windows system, it has only comments in it), but before you do, what does python -c "import socket; print(socket.socket().getsockname())" produce? Those addresses are set to 127.0.0.1 presumably to prevent internet resources from loading; in IPv4 that address means "the current host": en.wikipedia.org/wiki/Localhost – Glyph Jul 15 at 23:02
  15.  
  16. It returns this: socket.error: [Errno 10022] An invalid argument was supplied. So should I go ahead and remove all those lines? Also, thanks for the info (and link). – Scoutdrago3 Jul 16 at 22:16
  17.  
  18.  
  19. Yes, I think you should. One more question before you do though: what does python -c "from socket import socket; s = socket(); s.bind(('127.0.0.1', 0)); print(s.getsockname())" print out? – Glyph Jul 17 at 23:29
  20.  
  21. Prints out: ('127.0.0.1', 55156). So should I just delete all those lines? – Scoutdrago3 Jul 18 at 3:13
  22.  
  23.  
  24. Yeah, delete those lines. Although if your firewall is off I really cannot imagine what would prevent it from working, even with those in place; something like that result is exactly what I would expect on a working system. – Glyph yesterday
  25.  
  26. Deleted all lines, still nothing. – Scoutdrago3 yesterday
Advertisement
Add Comment
Please, Sign In to add comment