Discovery failed for resource: No module named paramiko #117
-
|
Hello All, I have created a shell that makes a ssh connection with a machine and execute some commands. For that, I used the python Paramiko library. The shell's project compiled fine, and the script that uses the paramiko's functions works. I have installed the paramiko module (using pip) in the machine. I can install succesfully the shell on CloudShell (using shellfoundry install), but I get the following error everytime I try to create the instance of that shell resource in the inventory (discovery process): "Discovery failed for resource 'shell1': 'get_inventory' command failed with 'General Exection' error. Descriptionm: Failed to start execution: Unexpected error -Python unhandled exception was raised while involking server method 'LoadDriver' 'No module named paramiko'..." Do anyone have an idea/feedback on how I can solve this problem? Thanks a lot in advance, Veronica Veronica Rivas (veronica.rivas) - 06/25/2018 04:02 PM
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Hi veronica.rivas@mantica-solutions.com When you use an external package with your shell, you need to add it to the requirements.txt file that is in your project. This way, when the driver is being executed for the first time, a new virtual environment is created for it, and all the external requirements are being installed there. Make sure you add a certain version of paramiko (and any other package), to reduce the chances of your driver fail to run because of an update made by these packages. So use something like: paramiko==2.4.1 or paramiko>=2.4,<2.5 you can check which paramiko you installed and that was working fine for you using "pip list". Yaniv Yaniv Kalsky (Yaniv.K) - 06/25/2018 04:48 AM
|
Beta Was this translation helpful? Give feedback.
-
|
Hi Yaniv.K, Thank you so much for your help. I really appreciate that. You are right. Now it works!!! =) Veronica Rivas (veronica.rivas) - 06/25/2018 09:20 AM
|
Beta Was this translation helpful? Give feedback.
Hi veronica.rivas@mantica-solutions.com
When you use an external package with your shell, you need to add it to the requirements.txt file that is in your project. This way, when the driver is being executed for the first time, a new virtual environment is created for it, and all the external requirements are being installed there.
Make sure you add a certain version of paramiko (and any other package), to reduce the chances of your driver fail to run because of an update made by these packages.
So use something like:
paramiko==2.4.1
or
paramiko>=2.4,<2.5
you can check which paramiko you installed and that was working fine for you using "pip list".
Yaniv
Yaniv Kalsky (Yaniv.K) - 06/25/2018 04:48 AM
·…