When I run this paramiko code in Komdo IDE 8.5.4 on a Mac, it fails. When I run the same script from the command line, it runs fine. What do I need to do to test paramiko code in Komodo?
To me it looks like Komodo is being fooled into thinking it is debugging code on a remote host.
#!/usr/bin/python
import paramiko, os
print os.sys.platform, os.sys.version
print “Paramiko”, paramiko.version
# Komodo IDE version is 8.5.4
paramiko.util.log_to_file("/tmp/paramiko.log")
client = paramiko.SSHClient()
client.load_system_host_keys()
client.connect(‘sshhost.com’) # use a real ssh server name
When run in the debugger, this is the output
darwin 2.7.5 (default, Mar 9 2014, 22:15:05)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)]
Paramiko 1.15.1
dbgpSocket: error: unable to connect to remote host at 127.0.0.1:60163
Unhandled exception in thread started by <function _dbgp_start_new_thread at 0x108923758>
Traceback (most recent call last):
File "/Applications/Komodo IDE 8.app/Contents/SharedSupport/dbgp/pythonlib/dbgp/client.py", line 3847, in _dbgp_start_new_thread
client.connect('', 9000, name)
File "/Applications/Komodo IDE 8.app/Contents/SharedSupport/dbgp/pythonlib/dbgp/client.py", line 2313, in connect
self.socket.connect()
File "/Applications/Komodo IDE 8.app/Contents/SharedSupport/dbgp/pythonlib/dbgp/client.py", line 2161, in connect
self._socket.connect((self.hostname,self.port))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 61] Connection refused
If I turn on ‘Listen for Debugging Connections’ under Debug then output changes to this
ERROR: dbgp.client:
The main thread of this application is exiting while there are still threads
alive. When the main thread exits, it is system defined whether the other
threads survive.
See Caveats at http://docs.python.org/lib/module-thread.html
The Caveats link returns a 404 error.