2

I have set up a plist file and loaded/started it with launchd. Whenever it is time for the script to run, I receive the following error in my console:

12/9/15 12:53:19.344 PM com.apple.xpc.launchd[1]: (kjuvbot[742]) Service could not initialize: 14F27: xpcproxy + 13421 [1402][AD0301K4-D354-31AE-8BA7-B5KBECE64P0B]: 0x2

Does anyone have any idea why this error might occur? Here is my .plist file:

kjuvbot.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>kjuvbot</string>
    <key>ProgramArguments</key>
    <array>
        <string>python3</string>
        <string>/Users/me/workspace/Learning/src/kjuvbot.py</string>
    </array>
    <key>StartInterval</key>
    <integer>3600</integer>
</dict>
</plist>

Does it by chance need com. in front of the filename?

Here are the permissions (I created the file as myself):

-rw-r--r--@ 1 me  staff  427 Dec  9 19:28 kjuvbot.plist
2
  • Where is python3 ? – mmmmmm Dec 10 '15 at 10:58
  • @Mark Ah ha! That is it. launchd is looking in /usr/bin for python3, isn't it? I changed the python3 path to the full path, and it worked just fine. Feel free to post your answer below, and I will accept it. Thanks!! – user3079064 Dec 10 '15 at 16:01
1

python3 is not in the path used by launchd which will be less that that in the terminal.

Try using the full path in the plist

e.g.

<key>ProgramArguments</key>
<array>
    <string>/usr/local/bin/python3</string>
    <string>/Users/me/workspace/Learning/src/kjuvbot.py</string>
</array>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .