supervisord python import error
Question: I'm trying to daemonize my bash script which starts running python script
inside.

Here is my program section of supervisord.conf

    
    
    [program:source]
    directory=/home/vagrant/
    command=/usr/local/bin/python /home/vagrant/start.py
    process_name=%(program_name)s
    user=vagrant
    autostart=true
    

When I start supervisord it doesn't work. From the log i receive:

    
    
    No module named monitor.tasks
    

When I run the program directly it works. Seems it has working directory issue
but I don't know how to solve. Any suggestion?


Answer: Found where my mistake was. I just had to use -m after python command as
follows:

    
    
    command=/usr/local/bin/python -m vagrant/start.py
    

