-
Notifications
You must be signed in to change notification settings - Fork 348
Paramiko in python script throws exception- TypeError: expected _counter, got _counterStarting ... #1118
Comments
On 2014-08-31 17:12:52 UTC, paweljasinski commented: We were able to run the python scripts from command prompt and connecting to SSH without any issues |
On 2014-08-31 17:14:23 UTC, paweljasinski commented: We were able to run the python scripts from command prompt and connecting to SSH without any issues how does your command line looks like? |
On 2014-09-01 15:02:29 UTC, jamini commented: Hi We are running the scripts from command line as follows : C:\Program Files (x86)\IronPython 2.7> ipy.exe -X:Frames C:.........\Sample.py I'm attaching the output for above execution, please find it. Thanks, |
On 2014-09-02 05:08:52 UTC, paweljasinski commented: I am afraid I have no simple answer for your question. sys.path permissions/credentials (who runs it) current working directory Something puzzling, I can find _counter but see no traces of _counterStarting. I checked paramiko and ironpycrypto. |
On 2014-09-02 12:11:04 UTC, jamini commented: Hi, Sorry I forgot to say this, the output "Starting" which was a simple print statement was appended to that _counter. So it appears as _counterStarting. Thanks, |
On 2014-09-02 19:00:36 UTC, jamini commented: We added a Microsoft.scripting.debugging.dll to our solution to debug the python scripts. While debugging them we found self.active property is getting false in client.py file in paramiko when executing ssh connect statement. There we are getting that __TypeError:Expected counter, got counter. The stack trace for that exception is as follows : Hope this information may help you to suggest us the approach to be followed. |
On 2014-09-04 21:29:31 UTC, paweljasinski commented: what is inside C:\xxtws\trunk\NHRLibrary\NHRTest1.py around line 678? |
Hi Team,
From our c# application, we are executing python (IronPython Version-2.7,
32-bit) scripts with the help of clrzmq (Version-2.2.5, 32-bit) for inter
process communication. From that python scripts we were trying to connect to
SSH using paramiko which is of 32-bit (Application runs in Any CPU mode).
We were able to run the python scripts from command prompt and connecting to
SSH without any issues, but when we try to run the same from our c#
application it is throwing us the following exception.
Traceback (most recent call last):
File "C:......\Sample.py", line 39, in
File "C:.......\ Sample1.py", line 674, in ** init **
File "C:\Program Files (x86)\IronPython 2.7\Lib\site-
packages\paramiko\client.py", line 242, in connect
File "C:\Program Files (x86)\IronPython 2.7\Lib\site-
packages\paramiko\transport.py", line 346, in start_client
TypeError: expected _counter, got _counterStarting ...
The python code which we have written is as follows:
** Sample.py: **
....
sys.path.append ("C:\Program Files (x86)\IronPython 2.7\Lib")
....
sys.path.append ("C:....\SampleLibrary")
import Sample1
d = Sample1.d
.....
print 'Initiating Paramiko interface'
print 'Starting ...'
.........
sshSession = Sample1.SampleSSH ('190.167.22.3', 'abc', 'abc')
theResult = sshSession.SSHCommand('...')
print "The result ..."
print theResult
** Sample1.py : **
from array import *
sys.path.append("C:\Program Files (x86)\IronPython 2.7\clrzmq.2.2.5")
clr.AddReference("clrzmq.dll")
from System.Text import Encoding
import ZMQ as zmq
from ZMQ import SocketType
sys.path.append("C:\Program Files (x86)\IronPython 2.7\Lib\site-packages")
sys.path.append("C:\Program Files (x86)\IronPython 2.7\DLLs")
clr.AddReference("IronPyCrypto.dll")
import paramiko
......
class SampleSSH:
def init(self, IP, user, password):
def SSHCommand( self, Command):
Could you please suggest us the better approach to be followed to resolve this
issue?
Thanks,
Jamini Mungara.
Work Item Details
Original CodePlex Issue: Issue 35515
Status: Proposed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Aug 30 at 8:05 AM
Reported by: jamini
Updated on: Sep 10 at 12:26 AM
Updated by: r4ndy
Binary Attachments
output.png
The text was updated successfully, but these errors were encountered: