Post Go back to editing

Emstat3 blue series - how to install pspython SDK module?

Category: Software
Software Version: PSTrace 5.9

Dear Support Team,

I hope this message finds you well. I am writing regarding an issue I am experiencing while attempting to install the PSPython SDK for my EmStat3 Blue potentiostat. I am trying to code the PSPython SDK to control the EmStat3 potentiostat, generate a square wave when triggered by an external TTL signal from the spectrometer. 

I have encountered difficulties during the installation process, and I would greatly appreciate your help.

Issue Description: I have downloaded the PSPython SDK folder from the website, and I am attempting to install it as a Python package so that I can control my EmStat3 Blue potentiostat using Python scripts. However, I have encountered the following problem:

When I attempt to install the SDK using the pip install . command in the SDK folder directory, I receive the error message: "ERROR: Directory '.' is not installable. Neither '' nor 'pyproject.toml' found."

  • PSPython SDK Folder: C:\Users\r01pg22\Downloads\PSPythonSDK and  R:\COPS\sncs\Electrochemistry\Pavi\PSPythonSDK\pspython both got me same error.
  • Python Environment: Python 3.8 - PyCharm
  • Operating System: Windows 10

Steps Taken: I have tried various approaches to install the SDK locally, but none have been successful. I attempted to mention the directory (pspython_folder = r"R:\COPS\sncs\Electrochemistry\Pavi\PSPythonSDK\pspython") in the code but the issue persists. 

I kindly request your help in resolving this issue. If there are specific installation instructions or workarounds for installing the PSPython SDK locally, I would greatly appreciate your guidance.

Please let me know if you require any further information or if there are specific details about my setup that would be helpful in diagnosing and addressing this problem. I could not find proper documentation on how to install this and read me.txt file had limited information. 

Best regards,


Parents Reply
  • I haven't well understood if the .mscr files are the same as the PSMETHOD type files and I just have to write a new method script file and import to the already existing python file.

    The ".mscr" files simply contain the MethodSCRIPT protocol, as understood by the device. These, you can send directly to the device and it will perform the script. Which means you do indeed need to edit these to change the device behavior. On the other hand, ".psmethod" files are much higher level datafiles, as used by PSTrace. You will need our C# core libraries to control a device using this.

    The examples at are meant to be simple and lightweight, so they do not use the C# core libraries and do not support ".psmethod" files. However, you can use PSTrace to convert a ".psmethod" file into MethodSCRIPT. This is described here:

    The C# SDK (Python) examples have access to much more functionality (mostly everything that can be found in PSTrace). The downside is that they can be more difficult to use in some cases and the source code of the library itself is not available.

    Since this thread was originally about the EmStat3, I will note that the EmStat3 does not support MethodSCRIPT and only has the C# SDK available for Python. The above applies only to the EmStat4 and EmStat Pico.

    Kind regards,

  • Hello Hielke again,

    first of all thanks for the quick responses, it's very helpful. What I did manage to do so far, is demonstrate the simple CV measurement (given in the examples) and modify the .mscr file by opening it in a notepad and come pasting there the MethodScript that I create, that is having different values etc. There are two further questions:

    1. The PSTrace gives the user the ability to perform analysis on the peaks (manipulate baseline, identify peaks, integrate etc.). However, the the MethodSCRIPT communication protocol v1.3 I don't see any argument towards that direction.

    2. I would like through my python code to be able to manipulate the different settings of the CV, through a custom made gui. Is that possible through the MethodSCRIPT ?



  • Hi Skioumou,

    1. MethodSCRIPT does not have built-in peak detection, but Python itself has excellent math tools, so I would recommend doing it in python. The C# SDK would have access to most peak analysis tools, although without the GUI.
    2. MethodSCRIPT is just text, so you can easily make a standard script where you can substitute values in, using Python string formatting. Below is a simple example.

    The following example will print a script that would output a single package with a code modifiable value, using f-string formatting:

    value_in_millis = 12
    script = f'''e
    pck_add {value_in_millis}m

    Kind regards,

  • That should work just fine.

    Thanks so much for helping!!

    All the best