15

I'm trying to auto-run SickBeard on login

python /Applications/Sick-Beard/Sickbeard.py

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd >
<plist version="1.0">
<dict>
  <key>Label</key>
  <string>com.sickbeard.sickbeard</string>
  <key>ProgramArguments</key>
  <array>
       <string>/usr/bin/python</string>
       <string>/Applications/Sick-Beard/SickBeard.py</string>
       <string>-q</string>
       <string>-d</string>
  </array>
  <key>RunAtLoad</key>
  <true/>
</dict>
</plist>

When I run launchctl com.sickbeard.sickbeard.plist it gives me the message:

launchctl load com.sickbeard.sickbeard.plist launchctl: no plist was returned for: com.sickbeard.sickbeard.plist launchctl: no plist was returned for: com.sickbeard.sickbeard.plist nothing found to load

1
  • I assume you meant "launchctl load com.sickbeard.sickbeard.plist" in your command line? Otherwise you'd get a completely different error ;-)
    – binarybob
    Mar 28, 2012 at 6:46

4 Answers 4

37

I'm assuming the paths to the python script and its parameters are valid, otherwise you'd most likely be seeing errors in the Console instead.

The last time I saw that error was because there were spurious characters in the plist, e.g. extra spaces, causing syntax errors and therefore making it fail to load. If you run plutil -lint on your plist, this will check the syntax for you and also handily report back the line on which the error occurred.

plutil -lint com.sickbeard.sickbeard.plist

If that doesn't help, the (OSX) How To Start SickBeard at Login or boot on OSX thread on the sickbeard forums has a slightly different plist to yours (sickbeard running from /usr/local as opposed to /Applications - so it could be a permissions thing) and also some people with seemingly the same problem as you

3
  • 2
    Thank you for your help. It seems that copying and pasting brought an extra character which was hidden. I've retyped the whole XML with nano and it worked just fine.
    – Joao Costa
    Mar 28, 2012 at 9:42
  • 2
    Thanks, never knew about plutil -lint before. Very handy!
    – robmathers
    Jun 2, 2013 at 16:42
  • Just found this posting, but checking out Console output helps alot with the debugging as well. Mar 23, 2014 at 2:20
2

As I discovered the hard way, you must execute the command using sudo as well as passing the full path of the .plist file as follows (in your case):

sudo launchctl load /Library/LaunchDaemons/com.sickbeard.sickbeard.plist

The path may be different for you, but you must locate the file to find out its location and pass it as I quoted to the launchctl command.

2

The message nothing found to load means sometimes that the config is overriden by an other config. You force the loading by using the option "-w" when using launchctl load or unload.

If you have to force the load or unload of a plist file, it means that you have a config which overrides the plist. This overriding is created when you use the "-w" otherwise no override will be added to the overrides file. To prevent this case, edit the file below, search the job label that you want to remove the override, delete the necessary lines:

pico /var/db/launchd.db/com.apple.launchd/overrides.plist

For example, delete this line

<key>com.mydomain.myjob</key>
<dict>
        <key>Disabled</key>
        <true/>
</dict>

then you could use: launchctl load or unload /Library/LaunchDaemons/com.mydomain.myjob.plist without the need of "-w" or "-F", you should not have the message nothing found to load

1

You might want to add the -F flag to force launchctl to load the .plist. Also, make sure that the .plist is in the paths launchctl searches. If your .plist is somewhere else, you may also add the -D flag and specify the domain. From the manpage:

-D domain
Look for plist(5) files ending in *.plist in the domain given. Valid domains include "system," "local," "network" and "all." When providing a session type, an additional domain is available for use called "user." For example, without a session type given, "-D system" would load from property list files from /System/Library/LaunchDaemons. With a session type passed, it would load from /System/Library/LaunchAgents.

Make sure that you thoroughly review all information contained in the manpage - you can really wreck things if your call is not properly configured.

You must log in to answer this question.

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