My guess is that Jenkins (either the agent or server) is running as a
different user, so the module isn't installed for that user. You show
"robert.szabo" for where robot.exe is installed, but is that the user that
Jenkins is running as on that system?

On Fri, Jul 24, 2020 at 6:48 AM Eric Pyle <eric.p...@cd-adapco.com> wrote:

> I wonder if this is because AppData is a hidden folder, and/or not
> accessible to the user running Jenkins. Can you try a directory listing of
> that Scripts directory in a Jenkins job batch command?
>
> Eric
>
> On 7/22/2020 11:50 AM, Robert Szabo wrote:
>
> Hi,
>
> Jenkins cant run my Robot Framework test cases.
>
> I run this job in Execute Windows batch command
>
> cd C:\work\robot\Es1P\
> set
> PYTHONPATH=C:\Users\robert.szabo\AppData\Roaming\Python\Python37\Scripts
> echo %PYTHONPATH%
> python.exe -m robot C:\work\robot\Es1P
> echo Completed
>
>
> Jenkins run of it always fails, console output is this:
>
> -----------------------------------------------------------------
> Console Output
>
> Started by user admin <http://localhost:8080/user/admin>
> Running as SYSTEM
> Building in workspace C:\Program Files (x86)\Jenkins\workspace\r1
> [r1] $ cmd /c call C:\windows\TEMP\jenkins1877465942945470142.bat
>
> C:\Program Files (x86)\Jenkins\workspace\r1>cd C:\work\robot\Es1P\
>
> C:\work\robot\Es1P>set 
> PYTHONPATH=C:\Users\robert.szabo\AppData\Roaming\Python\Python37\Scripts
>
> C:\work\robot\Es1P>echo 
> C:\Users\robert.szabo\AppData\Roaming\Python\Python37\Scripts
> C:\Users\robert.szabo\AppData\Roaming\Python\Python37\Scripts
>
> C:\work\robot\Es1P>python.exe -m robot C:\work\robot\Es1P
> C:\Program Files\Python37\python.exe: No module named robot
>
> C:\work\robot\Es1P>echo Completed
> Completed
>
> C:\work\robot\Es1P>exit 1
> Build step 'Execute Windows batch command' marked build as failure
> Finished: FAILURE
>
> -------------------------------------------------------------------------------------
>
> checking robot location in Powershell
>
>  (get-command robot.exe).Path
>
>  PS C:\work\robot\Es1P> (get-command robot.exe).Path
> C:\Users\robert.szabo\AppData\Roaming\Python\Python37\Scripts\robot.exe
>
>  So i think PYTHONPATH should work, but seems not.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/63d9fc16-cdd1-4db1-bb3e-cbb5908ddb83o%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/63d9fc16-cdd1-4db1-bb3e-cbb5908ddb83o%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/986c8bfa-07c4-7660-9d7f-db553d713d90%40cd-adapco.com
> <https://groups.google.com/d/msgid/jenkinsci-users/986c8bfa-07c4-7660-9d7f-db553d713d90%40cd-adapco.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Website: http://earl-of-code.com

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVdDZ6jAbwcLettKM2Seo6PZZ0wqyfShUkFVeDOO9MmGjw%40mail.gmail.com.

Reply via email to