Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #35328

    russell
    Participant

    Since updating the OpenSprinkler app (or perhaps OSPi) the logs no longer display. It shows “No entries in the selected data range.”  If I look at log.json via ssh, the data is there, and if I log in via a browser the log data can be be shown, but not if I use the Firefox, Chromium, or Android app.

    App version is shown as 1.2.7

    Firmware 2.2.2-OSPI

    It’s not a great problem just wondered if anyone else had noticed it?

    Russell

     

    #35329

    Samer
    Keymaster

    I can replicate the issue on my end and the error is located in mobile_app.py.

    127.0.0.1:55303 - - [24/Jan/2015 00:19:38] "HTTP/1.1 GET /jl" - 500 Internal Server Error
    Traceback (most recent call last):
      File "OSPi/web/application.py", line 239, in process
        return self.handle()
      File "OSPi/web/application.py", line 230, in handle
        return self._delegate(fn, self.fvars, args)
      File "OSPi/web/application.py", line 420, in _delegate
        return handle_class(cls)
      File "OSPi/web/application.py", line 396, in handle_class
        return tocall(*args)
      File "OSPi/plugins/mobile_app.py", line 160, in GET
        date = time.mktime(datetime.datetime.strptime(event["date"], "%Y-%m-%d").timetuple())
    TypeError: string indices must be integers

    I am not sure if the format changed however I will see what I can find out.

    Thanks for the report!

    #35330

    Samer
    Keymaster

    Further inspection appears to be an issue with log.json. OSPi seems to be escaping all the quotes for the first log entry, producing the following line:

    "{\"program\":\"Run-once\",\"station\":7,\"duration\":\"01:00\",\"start\":\"00:16:55\",\"date\":\"2015-01-24\"}"

    This is causing the mobile app plugin which parses the logs file to break.

    I have submitted this issue to Dan’s Github: https://github.com/Dan-in-CA/OSPi/issues/87. Hopefully Dan has some insight why this might be occurring.

    #35331

    russell
    Participant

    Thanks Samer, much appreciated

    #35337

    Dan in CA
    Participant

    I just pushed a rev to GitHub that should fix the problem.

    Dan

    #35345

    russell
    Participant

    Sorry, but still getting “No entries found in the selected data range”

    I did:

    git reset –hard origin/master
    HEAD is now at 84620b0 Fix json bug in helpers.py.

    Restarted from init.d and rebooted.

    Tried 2 browser apps and Android, all give the same result

    Russell

     

    #35346

    Samer
    Keymaster

    Please delete your log file and try again. The bug fix prevents future errors however the program has already inserted incorrect data into your log and must be manually cleaned out.

    Thanks

    #35347

    russell
    Participant

    Obviously 🙁  Sorry.

    Yes it works fine now. Thanks to all.

    Russell

    #35349

    Samer
    Keymaster

    Glad it’s working now, thanks for the report!

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