Error using clipboard on MAC from Jenkins

53 views
Skip to first unread message

Ginga, Dick

unread,
Dec 1, 2014, 10:04:52 AM12/1/14
to jenkins...@googlegroups.com

To all, we are getting errors when using the clipboard on MAC’s through jenkins. We have a simple script that demonstrates it. It copies and reads from the clipboard. When we run it from the command line we get:

 

Yuri-Aokis-MacBook-Pro:Source Testing$ cd qa/xxxx/Source

Yuri-Aokis-MacBook-Pro:Source Testing$ python clipboard.py 

HURAY!

Yuri-Aokis-MacBook-Pro:Source Testing$ 

 

When we run it from a Jenkins shell build step, we get:

 

05:32:29 + python clipboard.py
05:32:29 Traceback (most recent call last):
05:32:29   File "clipboard.py", line 17, in <module>
05:32:29     print (read_from_clipboard())
05:32:29   File "clipboard.py", line 13, in read_from_clipboard
05:32:29     'pbpaste', env={'LANG': 'en_US.UTF-8'}).decode('utf-8')
05:32:29   File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 575, in check_output
05:32:29     raise CalledProcessError(retcode, cmd, output=output)
05:32:29 subprocess.CalledProcessError: Command 'pbpaste' returned non-zero exit status 1

 

 

 

Dick Ginga, Informatics R&D

PerkinElmer Inc. | For the Better
HUMAN HEALTH | ENVIRONMENTAL HEALTH
940 Winter Street, Waltham MA 02451

 

dick.ginga@perkinelmer.com  

Mobile – 508-847-1434

Office – 781-663-6947

 

clipboard.py

Daniel Beck

unread,
Dec 1, 2014, 1:22:18 PM12/1/14
to jenkins...@googlegroups.com
The problem is likely that the pasteboard service is not available outside a graphical session.

This is not a Jenkins issue. This should also happen when logging it to your Mac via SSH to a user account without active graphical session.

`ps aux | grep pbs` should show you a pbs (paste board service) for all users that are logged in interactively, and the user Jenkins runs as does not have an entry.
> dick....@perkinelmer.com
> Mobile – 508-847-1434
> Office – 781-663-6947
>
>
>
> --
> 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-use...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/6C6EE445A6F6CE4E8A0FFB51B071A4E26E4C7D29%40AMERMBX02.PERKINELMER.NET.
> For more options, visit https://groups.google.com/d/optout.
> <clipboard.py>

Reply all
Reply to author
Forward
0 new messages