Showing results for 
Search instead for 
Did you mean: 

ModuleNotFoundError when using import datalayer

New Poster

ModuleNotFoundError when using import datalayer

Hello, colleague;

I am very intereasting in python with ctrlX. I have already installed the python app in my virtual controller.

some guys show me a example write by python,

the first line is " import Datalayer"

when I try to import Datalayer, it will throw out "ModuleNotFoundError".

Is this module have already installed in the Virtal control?  Or should I do something special seeting?

Thank you very much!python_no_module.png


Established Member

Re: ModuleNotFoundError when using import datalayer

Hello, is there any update about this problem? I got also the same error.


python error.png


Community Moderator

Re: ModuleNotFoundError when using import datalayer

Actually it is only possible to have access to the ctrlX Data Layer and the ctrlX MOTION via using the our integrated python interpreter. The interface to the firmware is fix connected to this app so there is no shared library that can be used via import.
You have to handle over complete .py files to it at start them. Other possibility would be to use the REST API out of your code to interact with our system. There all data and motion functions can be used.

When I get it right you set up your own app with your own python interpreter. There is at the moment no wheel or or other extensions for this case. This is planned to be provided with the March release RM21.03 (version 1.8) of the SDK.



Re: ModuleNotFoundError when using import datalayer

Good morning,

I am using a script that writes a value, via datalayer, it works correctly if I load and start it via REST API, following this instructions.

Now, I'm trying to use Tiger IDE, but I can't import datalayer script. I guess it is due to the python interpreter, what is the interpreter path?  can I change it?


I am working with the following versions:

  • ctrlX - 1.6.0
  • PythonRuntime - 1.6.0
  • Tiger 0.0.207


Thanks in advance.

Community Moderator

Re: ModuleNotFoundError when using import datalayer

Please first of all update your system to the release RM21.03 version (1.8) and also use the first official release 1.8 of the IDE app (former known as TIGER). The older version are prototypes including some known issues.

Further more there are two ways of running a script in the textual coding editor in the IDE app:

1) Run the script directly in the browser:

  • The signatures of the system functions are available and can be imported for programming purposes, like syntax highlighting and auto completion.
  • CodeShepherd_1-1618816041454.png

  • The interpreter integrated in the IDE app is used.

  • But the functions that should be called by the signatures are not available so this cannot run at the moment.

2) Run the script on the ctrlX CORE:

  • The signatures of the system functions are available and can be imported for programming purposes, like syntax highlighting and auto completion. Like above.

  • The interpreter of the python runtime on the ctrlX CORE is used.


  • Here the functions used in the code are part of and known by the python runtime in the system. So the import lines should be commented.

P.S.: The link in your post isn't working.