How can we help you today?
You are currently viewing the content available in Vietnam. If you are looking for information for another region, please select the correct country from the top-left dropdown in the page and 'Navigate to Browse FAQs' in the Support menu.

Managing the Geo SCADA Python API Version in Custom Python Integrations

Managing the Geo SCADA Python API Version
in Custom Python Integrations

Geo SCADA Expert technical guidance

Overview

When developing Python applications that integrate with Geo SCADA Expert, formerly ClearSCADA, it is essential to ensure that the Geo SCADA Python API installed on the computer matches the version of the Geo SCADA Server. Version mismatches can lead to compatibility issues, communication failures, or unexpected behavior within custom scripts.

This FAQ explains why version alignment is important, how to identify the Python API version in use, and how to update the API after a Geo SCADA Server upgrade.

Why is it important to update the Geo SCADA Python API when the server is upgraded?

The Geo SCADA Python API is closely linked to the corresponding Geo SCADA Server version. A server release may introduce updated interfaces, schema changes, bug fixes, or other enhancements. If custom Python code continues to use an older API version, the integration may experience:

  • Failed API calls caused by incompatible changes
  • Missing or unavailable functionality
  • Unexpected exceptions or communication errors
  • More difficult troubleshooting because the API and server versions are not aligned

To reduce these risks, update or reinstall the Geo SCADA Python API whenever the Geo SCADA Server is upgraded.

How do I programmatically check which Geo SCADA Python API version my script is using?

Run the following Python application (or add the proper commands to your own application:

import geoscada.client
import geoscada.base

def main():
# Showing the current Python API version
print(f"Python API version: {geoscada.base.version.version}")


if __name__ == '__main__':
main()

The output identifies the installed Geo SCADA Python API version. Consider writing this value to the application log during startup so that it is readily available during troubleshooting.

How do I update the Geo SCADA Python API after a server upgrade?

You can do this by executing the following at the command prompt on a Geo SCADA Expert server and on a Geo SCADA client where the Data Access:

python -m pip install --force-reinstall --no-index --find-links="C:\Program Files\Schneider Electric\ClearSCADA\PythonPackages" geoscada-client

The files are located at a slightly different location on a Geo SCADA Expert client. You reinstall the Python libraries that are specific to Geo SCADA Expert by executing the following at the command prompt on a Geo SCADA Expert client:

python -m pip install --force-reinstall --no-index --find-links="C:\Program Files\Schneider Electric\ClearSCADA Client\PythonPackages" geoscada-client

Run these using an Administrator account if you intend to execute Python from the Geo SCADA Server.

For more information, see ‘Install the Required Python Components on the Server’ in the Python Driver Guide in the online help.

What does the update command do?

  • --force-reinstall: Reinstalls the package even when a version is already installed.
  • --no-index: Prevents pip from searching online package repositories.
  • --find-links: Directs pip to the local PythonPackages folder installed with Geo SCADA.
  • geoscada-client: Specifies the Geo SCADA Python API package to install.

This procedure installs the API package supplied with the local Geo SCADA installation. If Geo SCADA is installed in a different directory, adjust the path used with --find-links accordingly.

When should I check or update the API version?

  • After upgrading the Geo SCADA Server
  • When deploying a Python application to a new computer
  • When troubleshooting unexpected API, connection, or compatibility errors
  • When validating development, test, and production environments
  • At application startup, when diagnostic information is written to a log

What should I do if the API version does not match the server version?

  1. Stop any scripts or services that use the Geo SCADA Python API.
  2. Run the pip force-reinstall command shown above.
  3. Run the version-checking code to confirm that the expected API version is installed.
  4. Restart the affected scripts or services.
  5. Test the integration and confirm that it connects and operates as expected.

Summary

Maintaining version alignment between the Geo SCADA Python API and the Geo SCADA Server is important for reliable Python integrations. Updating the API after every server upgrade, and recording the API version in application logs, can prevent compatibility problems and substantially simplify troubleshooting.

Schneider Electric Vietnam

Explore more
Product:
Users group

Discuss this topic with experts

Visit our community and get advice from experts and peers on this topic and more
Explore more
Product:
  • Products Documentation
  • Software Downloads
  • Product Selector
  • Product Substitution and Replacement
  • Help and Contact Center
  • Find our Offices
  • Get a Quote
  • Where to buy
  • Schneider Electric Community
  • Careers
  • Company Profile
  • Report a misconduct
  • Accessibility
  • Investors
  • EcoStruxure
  • Job Search
  • Blog
  • Privacy Policy
  • Cookie Notice
  • Terms of use
  • Change your cookie settings