OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) Startup script issues

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #22612

    rytz
    Member

    Hi OSPi fans!

    I’ve been trying to get the OSPi to boot to the interval_program demo automatically. To do so, I’ve got /etc/rc.local running a bash script calling the ospi.py file in the ~/os/OSPi/ directory and storing the output for both regular output and error output in /var/log/gh.out and /var/log/gh-err.out, respectively.

    ospi.py runs fine when started manually (i.e. sudo python ospi.py), but throws error codes when the systems boots. The contents of gh-err.out:

    Traceback (most recent call last):
    File "/home/pi/os/OSPi/ospi.py", line 11, in
    import ospi_addon #This provides a stub for adding custom features to ospi.py as external modules.
    File "/home/pi/os/OSPi/ospi_addon.py", line 2, in

    import ospi
    File "/home/pi/os/OSPi/ospi.py", line 328, in

    sdf = open('data/sd.json', 'r')
    IOError: [Errno 2] No such file or directory: './data/sd.json'

    Any help is greatly appreciated.

    #25411

    rytz
    Member

    Figured it out. RTFM.

    Fix was in the README for the program. Basically I needed to change to the OSPi directory in the rc.local script before running the script.

    Sorry everyone!

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) Startup script issues