Skip to main content
Solved

Upgrade FME Workspace to Python 3.6 --> No module named '_socket' when executing featureReader

  • February 26, 2020
  • 2 replies
  • 57 views

Hi everyone,

 

I'm currently updating some FME Workspaces from Python 2.7 to Python 3.6.

The workspaces have a private parameter containing a python script which imports arcpy and reads data from a SDE DB. The first transformer is a feature reader which reads features from an arcGIS Server (10.7.1) in my organization.

The python script containd in the private parameter is executed successfully.

The workspace fails when executing the feature reader with following log : 

Loaded Python module `arcgisonlinefeaturesfrom file `C:\Program Files\FME\python\python36\arcgisonlinefeatures\__init__.pyc'
Python Exception <ModuleNotFoundError>: No module named '_socket'
Could not create Python Reader `ARCGISFEATURES'
A fatal error has occurred. Check the logfile above for details

The python interpreter is set to use the dll installed with ArcGIS Pro : C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python36.dll. the python home in the fme options is left blank.

The python compatibility is set to "Python 3.6+"

All the transformers have been updated to the latest version available.

 

Does anyone have an idea what could be wrong with my setup?

 

 

My environment

  • FME Workbench 2019.1 64 bits
  • ArcGIS Pro 2.5
  • PATH environment variable contains "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib" and "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages"
  • PYTHONPATH environment variable contains "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib" and "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages"
  • Currently no PYTHONHOME environment variable on my system. Setting values to PYTHONHOME didn't seem to have any impact on the behavior.
  • When adding a python home in the fme options, "import arcpy" in the private parameter generates the error : no module named 'arcpy'

 

Best answer by rahulsharma

Hi @frederic.barras,

 

This environment is not fully supported, there could be some issues.

 

Please upgrade to FME Desktop 2019.2.3 (https://www.safe.com/support/downloads/ ) .

Open the workspace, and in the Navigator, expand Workspace Parameters --> Scripting --> Python Compatibility to "Esri ArcGIS Pro 2.1-2.5(Python 3.6)"

Run the workspace.

View original
Did this help you find an answer to your question?

2 replies

rahulsharma
Safer
Forum|alt.badge.img+10
  • Safer
  • Best Answer
  • February 26, 2020

Hi @frederic.barras,

 

This environment is not fully supported, there could be some issues.

 

Please upgrade to FME Desktop 2019.2.3 (https://www.safe.com/support/downloads/ ) .

Open the workspace, and in the Navigator, expand Workspace Parameters --> Scripting --> Python Compatibility to "Esri ArcGIS Pro 2.1-2.5(Python 3.6)"

Run the workspace.


I could run the workspace succesfully after following steps :

  • Installation of FME Desktop 2019.2.3.1 (build 19823 WIN64) (and deinstallation of previous version 2019.1.1)
  • FME Options --> Preferred Python Interpreter :"Esri ArcGIS Pro 2.1 - 2.5 Python (3.6)"
  • Python Compatibility --> "Esri ArcGIS Pro 2.1 - 2.5 (Python 3.6)"

@rahulsharma Thank you very much for the quick answer and help!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings