Log Viewer

Posted on
Tue Jan 21, 2014 10:41 pm
automaton offline
Posts: 105
Joined: May 23, 2008

Log Viewer

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

Posted on
Wed Jan 22, 2014 10:49 am
jay (support) offline
Site Admin
User avatar
Posts: 14156
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Log Viewer

It looks like there's a non-ascii character in your log which the plugin isn't handling correctly.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Thu Jan 23, 2014 6:45 pm
automaton offline
Posts: 105
Joined: May 23, 2008

Re: Log Viewer

Weird, it has healed itself, which supports your theory. What would generate a non-ascii character in the log?

Posted on
Thu Jan 23, 2014 6:59 pm
jay (support) offline
Site Admin
User avatar
Posts: 14156
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Log Viewer

Pretty much any script or plugin could. A device or variable name that has unicode characters in it.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Thu Jan 23, 2014 7:33 pm
matt (support) offline
Site Admin
User avatar
Posts: 18380
Joined: Jan 27, 2003
Location: Texas

Re: Log Viewer

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.

Image

Posted on
Wed Jun 18, 2014 9:57 am
bschollnick2 offline
Posts: 1297
Joined: Oct 17, 2004
Location: Rochester, Ny

Re: Log Viewer

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.

------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33

Posted on
Mon Sep 15, 2014 2:02 pm
howartp offline
Posts: 3230
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Log Viewer

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

Posted on
Tue Sep 16, 2014 12:54 pm
bschollnick2 offline
Posts: 1297
Joined: Oct 17, 2004
Location: Rochester, Ny

Re: Log Viewer

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

------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33

Posted on
Tue Sep 16, 2014 12:58 pm
howartp offline
Posts: 3230
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Log Viewer

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

Posted on
Mon Nov 10, 2014 1:28 pm
DVDDave offline
Posts: 294
Joined: Feb 26, 2006
Location: San Jose, CA

Re: Log Viewer

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

Posted on
Tue Nov 11, 2014 5:50 am
DaveL17 offline
User avatar
Posts: 3909
Joined: Aug 20, 2013

Re: Log Viewer

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

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Tue Nov 11, 2014 8:37 am
DVDDave offline
Posts: 294
Joined: Feb 26, 2006
Location: San Jose, CA

Re: Log Viewer

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

Posted on
Tue Nov 11, 2014 9:55 am
DaveL17 offline
User avatar
Posts: 3909
Joined: Aug 20, 2013

Re: Log Viewer

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

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Tue Nov 11, 2014 11:17 am
howartp offline
Posts: 3230
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Log Viewer

I never actually followed up on this; I'll try and look in the next couple of days but it might not be tonight.

Posted on
Tue Nov 11, 2014 12:22 pm
DaveL17 offline
User avatar
Posts: 3909
Joined: Aug 20, 2013

Re: Log Viewer

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

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Who is online

Users browsing this forum: No registered users and 1 guest