Page 1 of 2

Log Viewer

PostPosted: Tue Jan 21, 2014 10:41 pm
by automaton
Somewhere between Indigo 6.05 and 6.09 my log viewer stopped working. The errors are shown below. Any idea how to revive it?

Code: Select all
  WebServer                       internal server error "http://xxxx.xxxx.com:8000/Eventlog/" from 192.168.241.36
  WebServer                       

Request Headers:
  HOST: xxxx.xxxx.com:8000
  ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  USER-AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.73.11 (KHTML, like Gecko) Version/7.0.1 Safari/537.73.11
  CONNECTION: keep-alive
  Remote-Addr: 192.168.241.36
  ACCEPT-LANGUAGE: en-us
  ACCEPT-ENCODING: gzip, deflate

Traceback (most recent call last):
  File "/Library/Application Support/Perceptive Automation/Indigo 6/IndigoWebServer/cherrypy/_cprequest.py", line 609, in respond
    cherrypy.response.body = self.handler()
  File "/Library/Application Support/Perceptive Automation/Indigo 6/IndigoWebServer/cherrypy/_cpdispatch.py", line 25, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/Library/Application Support/Perceptive Automation/Indigo 6/IndigoWebServer/plugins/Eventlog/reqhandler.py", line 267, in index
    html_elems.append("      </table>\n")
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 20: ordinal not in range(128)

  WebServer                       undefined page requested "http://xxxx.xxxx.com:8000/Eventlog/css/global4.css" from 192.168.241.36
  WebServer                       undefined page requested "http://xxxx.xxxx.com:8000/Eventlog/css/indigo4.css" from 192.168.241.36

Re: Log Viewer

PostPosted: Wed Jan 22, 2014 10:49 am
by jay (support)
It looks like there's a non-ascii character in your log which the plugin isn't handling correctly.

Re: Log Viewer

PostPosted: Thu Jan 23, 2014 6:45 pm
by automaton
Weird, it has healed itself, which supports your theory. What would generate a non-ascii character in the log?

Re: Log Viewer

PostPosted: Thu Jan 23, 2014 6:59 pm
by jay (support)
Pretty much any script or plugin could. A device or variable name that has unicode characters in it.

Re: Log Viewer

PostPosted: Thu Jan 23, 2014 7:33 pm
by matt (support)
Note the Event Log plugin could probably be modified to handle the unicode character correctly. It might just need to use a unicode string (u"") instead of an ascii string ("") somewhere. I'm not familiar with the code though and it isn't obvious from the stack trace in your event log as to where the problem is specifically.

Re: Log Viewer

PostPosted: Wed Jun 18, 2014 9:57 am
by bschollnick2
matt (support) wrote:
Note the Event Log plugin could probably be modified to handle the unicode character correctly. It might just need to use a unicode string (u"") instead of an ascii string ("") somewhere. I'm not familiar with the code though and it isn't obvious from the stack trace in your event log as to where the problem is specifically.


Unicode can be a pain. I'm having issues with it with some Image gallery software that I'm working on.

The true fix is Python v3 (completely Unicode based), but for v2 the unidecode library is excellent for mapping unicode to ascii.

That being said, I am starting to rework or re-evaluate some of the older plugins, and decide what I need to do to update them.

By the way, I just realized that my RSS feeds were killed when you migrated to the newer version of the forum software.
I would suggest that you point out somewhere that the complete RSS feed is available from the pull down. I was concerned that I would have to add 30+ feeds so that I could monitor the forums I need to view.

Re: Log Viewer

PostPosted: Mon Sep 15, 2014 2:02 pm
by howartp
Does this still work for 6.0.14?

I copied it to /Library/Application Support/Perceptive Automation/Indigo 6/IndigoWebServer/plugins/Eventlog and reloaded Indigo.

When I browse to http://192.168.3.2:8176/Eventlog/ I get 'internal server error' and nothing else.

Just noticed this in the logs... :oops:

Code: Select all
WebServer                       internal server error "http://192.168.3.2:8176/Eventlog/" from 192.168.3.2
  WebServer                       

Request Headers:
  AUTHORIZATION: Digest username="removed", realm="Indigo Control Server", nonce="removed", uri="/Eventlog/", response="removed", algorithm="MD5", cnonce="removed", nc=00000001, qop="auth"
  HOST: 192.168.3.2:8176
  ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  USER-AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.78.2 (KHTML, like Gecko) Version/7.0.6 Safari/537.78.2
  CONNECTION: keep-alive
  Remote-Addr: 192.168.3.2
  ACCEPT-LANGUAGE: en-us
  ACCEPT-ENCODING: gzip, deflate

Traceback (most recent call last):
  File "/Library/Application Support/Perceptive Automation/Indigo 6/IndigoWebServer/cherrypy/_cprequest.py", line 609, in respond
    cherrypy.response.body = self.handler()
  File "/Library/Application Support/Perceptive Automation/Indigo 6/IndigoWebServer/cherrypy/_cpdispatch.py", line 25, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/Library/Application Support/Perceptive Automation/Indigo 6/IndigoWebServer/plugins/Eventlog/reqhandler.py", line 210, in index
    csv_data, tag_data, dates = _read_indigo_log_file(r'%s' % filename, csv_data, tag_data, dates)
  File "/Library/Application Support/Perceptive Automation/Indigo 6/IndigoWebServer/plugins/Eventlog/reqhandler.py", line 66, in _read_indigo_log_file
    for log_line in csv_file:
Error: line contains NULL byte

  WebServer                       undefined page requested "http://192.168.3.2:8176/Eventlog/css/indigo4.css" from 192.168.3.2
  WebServer                       undefined page requested "http://192.168.3.2:8176/Eventlog/css/global4.css" from 192.168.3.2


Peter

Re: Log Viewer

PostPosted: Tue Sep 16, 2014 12:54 pm
by bschollnick2
howartp wrote:
Does this still work for 6.0.14?


It should. I haven't checked recently but I did update it for Indigo v5/6 a while back.

Check to see that you are using the latest version v1.57a - https://dl.dropboxusercontent.com/u/241 ... g_157a.zip
Error: line contains NULL byte

WebServer undefined page requested "http://192.168.3.2:8176/Eventlog/css/indigo4.css" from 192.168.3.2
WebServer undefined page requested "http://192.168.3.2:8176/Eventlog/css/global4.css" from 192.168.3.2[/code]


This indicates that there is a NULL byte, that maybe in the log file. That could be due to a plugin, or device name, or something else? Do you have any device names that are not standard ASCII?

- Benjamin

Re: Log Viewer

PostPosted: Tue Sep 16, 2014 12:58 pm
by howartp
bschollnick2 wrote:
Code: Select all
Error: line contains NULL byte

  WebServer                       undefined page requested "http://192.168.3.2:8176/Eventlog/css/indigo4.css" from 192.168.3.2
  WebServer                       undefined page requested "http://192.168.3.2:8176/Eventlog/css/global4.css" from 192.168.3.2
This indicates that there is a NULL byte, that maybe in the log file. That could be due to a plugin, or device name, or something else? Do you have any device names that are not standard ASCII?

- Benjamin

Not to my knowledge; I'm using all English ones and nothing fancy.

I'll have a look - I spotted that error after I posted but didn't have time to look through at that point.

Peter

Re: Log Viewer

PostPosted: Mon Nov 10, 2014 1:28 pm
by DVDDave
Wow, this log viewer works spectacularly well. I can't believe it took me this long to find it.

A couple of minor notes:

I have been working with the Indigo developers to fix a problem associated with changing the Indigo root that prevented the Log Viewer from working. Matt sent me a test file that seems to have fixed it. I suspect he will issue an update shortly.

Also, one completely minor problem with the Log Viewer is that the number of days to show the log is off by one; e.g., asking for 3 days only shows 2. I have not looked through this whole thread so my apologies if this has been discussed before. Aside from that, it seems to work perfectly with Indigo 6.

--Dave

Re: Log Viewer

PostPosted: Tue Nov 11, 2014 5:50 am
by DaveL17
Hi Dave -

I have been working with the Indigo developers to fix a problem associated with changing the Indigo root that prevented the Log Viewer from working.

Were you receiving an "Internal Server Error" message? I installed this plugin, but am receiving the same message that Peter is receiving above.

Thanks,
Dave

Re: Log Viewer

PostPosted: Tue Nov 11, 2014 8:37 am
by DVDDave
Dave,

No, the problem was that the link to the log viewer did not work since I had changed the Indigo root. See viewtopic.php?f=108&t=12855

I have not seen the error noted by Peter.

--Dave

Re: Log Viewer

PostPosted: Tue Nov 11, 2014 9:55 am
by DaveL17
DVDDave wrote:
Dave,

No, the problem was that the link to the log viewer did not work since I had changed the Indigo root. See viewtopic.php?f=108&t=12855

I have not seen the error noted by Peter.

--Dave

Thanks Dave.

Hopefully, Peter and Ben are monitoring the thread and would be able to provide some insights.

Cheers,
Dave

Re: Log Viewer

PostPosted: Tue Nov 11, 2014 11:17 am
by howartp
I never actually followed up on this; I'll try and look in the next couple of days but it might not be tonight.

Re: Log Viewer

PostPosted: Tue Nov 11, 2014 12:22 pm
by DaveL17
howartp wrote:
I never actually followed up on this; I'll try and look in the next couple of days but it might not be tonight.

Thanks very much.

Cheers,
Dave