ConfD User Community

Error on make query : 1-2-3-start-query-model

Hello Everyone,

I installed confD.
i navigated to 1-2-3-start-query-model example.
i compiled successfully via “cmd: make all”
I configured successfully via “cmd: make clie”
But make query command was not executed succesfully.

Here is the output:
/home/kageja/opt/confd/bin/bin/netconf-console cmd-get-dhcpd.xml
Traceback (most recent call last):
File “/home/kageja/opt/confd/bin/bin/netconf-console.py”, line 21, in
import paramiko
File “/home/kageja/.local/lib/python3.8/site-packages/paramiko/init.py”, line 30, in
from paramiko.transport import SecurityOptions, Transport
File “/home/kageja/.local/lib/python3.8/site-packages/paramiko/transport.py”, line 61, in
from paramiko.sftp_client import SFTPClient
File “/home/kageja/.local/lib/python3.8/site-packages/paramiko/sftp_client.py”, line 41, in
from paramiko.sftp_file import SFTPFile
File “/home/kageja/.local/lib/python3.8/site-packages/paramiko/sftp_file.py”, line 66
self._close(async=True)
^
SyntaxError: invalid syntax
make: *** [Makefile:88: query] Error 1

I guess, python version is missmatch ?

Many thanks in advance,
With My Best Regards.

Hi,

After a quick search:

——8-<————8-<——

async is a keyword in python 3.5+. As you are running this code in python 3.7 assigning a value to a keyword raises a syntax error. If you ran this code in 2.7, it would work just fine.

It looks like this line is not in the most recent version of paramiko, which renames this variable to async_:

def _close(self, async_=False):
    # We allow double-close without signaling an error, because real

Simply upgrading paramiko to the most recent version should solve your problem:

sudo pip install -U paramiko 

——8-<————8-<——