OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › Log display
- This topic has 8 replies, 3 voices, and was last updated 10 years ago by Samer.
-
AuthorPosts
-
January 24, 2015 at 1:00 am #35328
russellParticipantSince 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
January 24, 2015 at 1:22 am #35329
SamerKeymasterI 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!
January 24, 2015 at 1:29 am #35330
SamerKeymasterFurther 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.
January 24, 2015 at 1:34 am #35331
russellParticipantThanks Samer, much appreciated
January 24, 2015 at 3:09 pm #35337
Dan in CAParticipantI just pushed a rev to GitHub that should fix the problem.
Dan
January 24, 2015 at 6:47 pm #35345
russellParticipantSorry, 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
January 24, 2015 at 6:51 pm #35346
SamerKeymasterPlease 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
January 24, 2015 at 7:03 pm #35347
russellParticipantObviously 🙁 Sorry.
Yes it works fine now. Thanks to all.
Russell
January 24, 2015 at 7:06 pm #35349
SamerKeymasterGlad it’s working now, thanks for the report!
-
AuthorPosts
- You must be logged in to reply to this topic.
OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › Log display