OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) interval program problem: gv.lg = gv.sd[‘lg’]

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

    n8w
    Participant

    Hi. Using the latest update for the interval_program port to the Pi. It used to be running fine, until I pulled in the latest update. Now it doesn’t start. When I run sudo python ./ospi.py, it throws this error:

    Traceback (most recent call last):
    File “./ospi.py”, line 18, in
    import ospi_addon #This provides a stub for adding custom features to ospi.py.
    File “/home/pi/opensprinkler/OpenSprinkler Pi/software/demos/interval_program/OSPi/ospi_addon.py”, line 2, in

    import ospi
    File “/home/pi/opensprinkler/OpenSprinkler Pi/software/demos/interval_program/OSPi/ospi.py”, line 284, in

    gv.lg = gv.sd # Controlls logging
    KeyError: ‘lg’

    For the record, no I haven’t touched the ospi_addon to customize anything. Any help?

    I opened an issue for this last week at https://github.com/rayshobby/opensprinkler/issues/9 … didn’t get any response. Ray’s not interested in looking at it either. That looks like a pretty basic undefined symbol. Ideas?

    Thanks

    #25133

    Dan in CA
    Participant

    It looks like the sd.json file in the OSPi/data directory is missing a couple of logging related keys. If you saved your setting by backing up and then restoring the files in the data directory, or just replaced the ospi.py file that could cause this problem 😳

    You should be able for fix the problem by editing the sd.json file. It is just a text file. Add the following:
    , “lg”: “”, “lr”: “100”
    just before the final curly brace , }

    You could also just replace the file with the the one from the update but you will loose some of your settings.

    In the July 21st update of the ospi.py file I added some error checking which should have eliminated the error.

    Dan

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) interval program problem: gv.lg = gv.sd[‘lg’]