Introduction
FME 2025.2 introduces the ability to edit Python scripts in an external editor in FME Form. Editing Python scripts in a code editor helps you write code faster by enabling you to leverage features such as auto-completion, syntax highlighting, and inline syntax error detection. This reduces mistakes and makes coding smoother. FME currently supports two external editors for Python: PyCharm and Visual Studio Code. At least one of these editors must be installed to use this feature.
This article provides a walk-through of this feature and answers to some frequently asked questions from our users.
Requirements
- FME Form 2025.2+
- PyCharm or Visual Studio Code
Step-By-Step Instructions
1. Open FME Workbench 2025.2+
To use an external editor for Python, in a Python editor, like the PythonCaller, click the External Editor button located at the bottom right of the Python text editor.
If you have not used this functionality before:
You will be prompted to select the editor FME Workbench opens for Python. You have a choice of Visual Studio Code or PyCharm.
FME Workbench will attempt to auto-detect the path to the editor executable based on your editor choice.
If FME Workbench cannot detect the path to the executable, manually enter the path using the ellipsis button to the right of the 'Path to editor executable…' field. This field is required and must be completed before you can proceed.
If you have used this functionality before:
Your previous selection will be remembered, and the selected editor will open with the content of the Python script in the Python editor window in FME Workbench.
FME Workbench copies the content of the Python text editor window to a .py file that is located in a temporary folder named “python-files-” ending with a randomly generated string. You may be prompted to trust the files in this folder by the external editor application. Click “Trust the authors” or “Trust project” in the external editor application.
When the external editor for Python is open, you will be blocked from making any changes to the Python script in the Python editor window in FME Workbench. This prevents conflicts that may occur when changes are made in two different locations.
2. Edit Python in the External Editor
Make the changes to your Python script in the external editor.
Running the script is not currently supported and may result in errors. It is recommended to run the script within FME Workbench for testing and debugging purposes.
Save the temporary Python file. Changes need to be saved to the temporary file for them to be reflected in FME Workbench. Close the external editor application.
3. Return to FME Workbench
Back in FME Workbench, the dialog window blocking changes to the Python text editor window in FME Workbench should automatically close after the external editor has been shut down. A banner stating “Scripted Updated” should appear above the Python text editor window.
Frequently Asked Questions
Where is the external editor for Python functionality available in FME Workbench?
This functionality is available for FME Form 2025.2 and newer, and where Python can be used in FME Workbench:
- Scripted parameter value (Python)
- Python Startup Script
- Python Shutdown Script
- PythonCaller
- PythonCreator
What external editors for Python are supported?
Two external editors are currently supported: PyCharm and Visual Studio Code.
How can I change the default external editor in FME Workbench?
In FME Workbench’s menu bar, go to Utilities > FME Options > Workbench > Text Editor Options > External Editor for Python and select one of the following options: None, Visual Studio Code, or PyCharm.
Selecting ‘None’ will prompt FME Workbench to open a dialog window for you to select which editor you want to use the next time the External Editor button is clicked.
Why do my changes fail to appear in FME even with the “Script Updated” banner?
Any changes to the Python script must be saved to the temporary Python file before the external editor is closed in order for the changes to be reflected in FME. The content of the temporary Python file is copied back to the Python text editor in FME when the external editor application or the temporary Python file is closed.
Ensure you have saved any changes made to the temporary script file. Depending on the external editor and your settings, you may not be prompted to save any unsaved changes prior to closing the external editor application.
Why did my Python script fail to update in FME?
FME tracks changes using a temporary .py file named in a certain format that is located in a temporary folder named “python-files-” ending with a randomly generated string. If either the temporary file or folder is renamed, moved, or deleted, FME will immediately show an “Update Failed” error banner.
Ensure the temporary file and folder created by FME are not renamed, moved, deleted, or changed outside of the editor’s usual edit and save process.
Why does my Python script error when run in the external editor?
Running the Python script in the external editor is not currently supported and may result in errors. The intended use of this feature is to enable users to edit the script in an external editor, save the changes, and then run the script within FME Workbench to test the changes.
While it is possible to create a generic Python script that doesn’t use FME-specific libraries, allowing it to be run within an external editor, it is highly recommended to run the script within FME Workbench for testing and debugging purposes.
Why does code completion, error detection not work in the external editor?
In Visual Studio Code, features such as code completion, error detection, formatting, etc., require the Microsoft Python extension to be installed and enabled. Ensure the Microsoft Python extension is installed in Visual Studio Code.