Python in Jenkins error message

alex

New member
Hi, When I run a script with Jenkins I get an error message that says” An error occurred while running the Python script 'pythonTemplate': The Python engine 'C:/soft/TIMi/Python/python36.dll' was not found. Please setup the location of your Python engine (go to the drop-down menu "Addons" and click on "Configure Python interface").
Run has been stopped unexpectedly! …”
 

Support

Administrator
Hi Alex,
Looking at your error message, we see that Anatella stops because Anatella cannot find the python engine located in the directory:
C: /soft/TIMi/Python/python36.dll
Without proper configuration, python boxes do pose a problem in Jenkins. ... But that's not the only thing that can mess up (see section 4.7.9.2.1. "Installing Jenkins" from AnatellaQuickGuide.pdf): more exactly:
alexforum1.png

In general, when you want to put in production a graph, one creates a "technical user" (for example named "JenkinsUser") which has "extended rights". For example, what we absolutely want to avoid "in production" (ie for an Anatella job that runs in Jenkins), is that the job stops because the job involved a "too big" data extraction out of the database. As a result, we will give greater rights to the technical user, to prevent a job from being advertised.

When we put a graph "in production" in Jenkins, the graph will stop running under your own name: it will now be executed (typically) under the name "JenkinsUser". We must therefore ensure the following elements (it is the same list as above):
1. "shared drives" are accessible to the user "JenkinsUser"
2. The ODBC-DSNs are accessible to the user "JenkinsUser" (this is not necessary if ODBC type 2 link has been used instead of type 1 ODBC link: see section 5.1.6.2. AnatellaquickGuide.pdf for more info on this).
3. the serial number of TIMi is: either "system-wide", or entered for the user "JenkinsUser".
4. the locations of the R engine and the python engine are specified.
If we do not specify anything, then Anatella is looking for ...
* ... the R engine in the "default" directory named "<timi_install_dir> / r" (typically it will be "c: \ soft \ TIMiPortable \ R").
* ... the Python engine in the "default" directory named "<timi_install_dir> / python" (typically it will be "c: \ soft \ TIMiPortable \ python").

We can still "manually" change, for each box R or Python, the location of the R / Python engine used (it also allows to mix in the same graph Anatella several different versions of the engine R / Python): ... for R :

alexforum2.png

For python

alexforum3.png

Even if all jobs run under the same technical user named "JenkinsUser", that does not mean that we can do anything no more: Jenkins allows to define different "profiles" of users (which are managed by Jenkins and not by Windows). Some "Jenkins profiles" can just check jobs and not add new jobs, etc.
In your case, if you just have a limited number of python boxes to run, the easiest way is to manually specify the location of the R / Python engine used for each box: For example:

alexforum4.png
 
Top