Solved

Import error when using paramiko and scp python libraries on FME Server

  • 24 June 2022
  • 2 replies
  • 172 views

Badge +1

Hello everyone,

 

I'm using the paramiko and scp python libraries in a pythoncaller to transfer files from my local environment to a remote Linux server. When testing locally I received an import error which I could solve by removing all contents of C:\\Users\\<user>\\Documents\\FME\\Plugins\\Python and reinstalling paramiko and scp.

 

However, when I transferred the contents to the Plugin folder on my FME Server instance, managed by FME Cloud, I received the same import error I previously received on FME Desktop even though the Plugin folder on FME Server was empty to start with.

 

The import error I receive is formatted like this: Python Exception <ImportError>: cannot import name '_bycript' from partially initialized module 'bcrypt' (most likely due to a circular import) (/data/fmeserver/resources/engine/Plugins/Python/bcrypt).

 

The following python code is the source of the import error:

import paramiko

from scp import SCPClient

 

I noticed that the importerror might be related to the FME Version I am using. Both Desktop and Server are version 2021.2.5.0 Build 21816 WIN64. Locally It worked on an older version (2020.2.0.0 Build 20787 WIN64) before I reinstalled paramiko and scp to make it work on the 2021.2.5 version.

 

Thank you in advance for all the help.

icon

Best answer by siennaatsafe 25 June 2022, 00:26

View original

2 replies

Userlevel 1
Badge +9

Hi @kd​ 

 

Do you know if paramiko and scp are OS specific? I've seen users need specific Linux libraries before.

 

What version of Python are you using? You may need to create a folder in FME Server if the version doesn't match the Python Compatibility setting in FME Desktop.

Badge +1

Hi @kd​ 

 

Do you know if paramiko and scp are OS specific? I've seen users need specific Linux libraries before.

 

What version of Python are you using? You may need to create a folder in FME Server if the version doesn't match the Python Compatibility setting in FME Desktop.

Hello Sienna,

 

I managed to fix the issue using your suggestions.

I first installed paramiko and scp on a Linux server. Then I copied those files to FME Server under a new subfolder 'Resources\\Engine\\Plugins\\Python\\python38'.

 

Thank you for helping me!

Reply