[ANSWERED]: Suppress Error Logging For Refreshing URL?

Posted on
Tue Jun 24, 2014 9:47 am
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

[ANSWERED]: Suppress Error Logging For Refreshing URL?

I have some small refreshing URL's on a CP of my security cameras.
Thing is I only have Security Spy running when I actually need to see
the images so when I access the page, and the cams are not active,
I get a flood of these errors:

WebServer http://192.168.1.80:8000/++image?camera ... height=240 load error: <urlopen error (61, 'Connection refused')>

Might there be a way to suppress the error messages?

Thanks,

Carl

Posted on
Tue Jun 24, 2014 10:53 am
matt (support) offline
Site Admin
User avatar
Posts: 21429
Joined: Jan 27, 2003
Location: Texas

Re: Suppress Error Logging For Refreshing URL?

Hi Carl,

You could hack this line in file /Library/Application Support/Perceptive Automation/Indigo 6/IndigoWebServer/indigopy/indigoreqhandler.py:

Code: Select all
               cherrypy.server.indigoConn._RaiseServerError(imageUrl + " load error: " + str(err))

to instead be:

Code: Select all
               pass

Be sure and stop/restart the Indigo Server so the new version of the file is loaded.

Image

Posted on
Tue Jun 24, 2014 12:02 pm
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: [ANSWERED]: Suppress Error Logging For Refreshing URL?

Excellent, thanks. Is it ok to edit the file in TextEdit?

Carl

Posted on
Tue Jun 24, 2014 12:03 pm
matt (support) offline
Site Admin
User avatar
Posts: 21429
Joined: Jan 27, 2003
Location: Texas

Re: [ANSWERED]: Suppress Error Logging For Refreshing URL?

I would recommend TextWrangler. It is free and better for code editing.

Image

Posted on
Tue Jun 24, 2014 12:07 pm
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: [ANSWERED]: Suppress Error Logging For Refreshing URL?

Thanks.

Carl

Posted on
Thu Jun 26, 2014 1:15 pm
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: [ANSWERED]: Suppress Error Logging For Refreshing URL?

Well I gave replacing the line you suggested above a try but get this in the error log:
Code: Select all
WebServer                       

Request Headers:
  AUTHORIZATION: Digest username="m", realm="Indigo Control Server", nonce="8297638d183dc7bf5c83d986105eed63", uri="/refreshingimage?page=All%20House&id=115", response="10e513ec5a6a5080d2b5b0435516c3a4", algorithm="MD5", cnonce="78930ce4f34cbc1fd9ae64f33e9bae3b", nc=00000049, qop="auth"
  HOST: tv.local.:8176
  ACCEPT: */*
  USER-AGENT: IndigoTouch_store/1.7.0 CFNetwork/548.1.4 Darwin/11.0.0
  CONNECTION: keep-alive
  Remote-Addr: 192.168.1.7
  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/indigopy/indigoreqhandler.py", line 440, in refreshingimage
    if result_content_type != '' and result_content_type.find('image') != 0:
UnboundLocalError: local variable 'result_content_type' referenced before assignment



In Touch when I view the page with the missing camera images I'm seeing a constant toggling of "Failed to connect..."
and "Connected thru Bonjour..." messages at the bottom of the page.

Maybe some other line needs to get changed as well?

Thanks,

Carl

Posted on
Thu Jun 26, 2014 1:59 pm
matt (support) offline
Site Admin
User avatar
Posts: 21429
Joined: Jan 27, 2003
Location: Texas

Re: [ANSWERED]: Suppress Error Logging For Refreshing URL?

It might be an indention problem. Python uses indents to determine code scope, so make sure the "pass" line is indented exactly the same as the line you replaced.

Image

Posted on
Thu Jun 26, 2014 2:31 pm
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: [ANSWERED]: Suppress Error Logging For Refreshing URL?

I doubled checked that but still same issue.
This is a very back burner issue...I assume you have
much more pressing things to look into.

Thanks

Carl

Posted on
Thu Jun 26, 2014 2:34 pm
matt (support) offline
Site Admin
User avatar
Posts: 21429
Joined: Jan 27, 2003
Location: Texas

Re: [ANSWERED]: Suppress Error Logging For Refreshing URL?

Sorry, my suggestion was wrong. Instead of pass, try this:

return self._ReturnError(kHtmlPageStr, "couldn't load image")

Image

Posted on
Thu Jun 26, 2014 2:41 pm
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: [ANSWERED]: Suppress Error Logging For Refreshing URL?

That returns " WebServer couldn't load image" in the log....many times.
The Touch CP loads without any errors though.

Thanks,

Carl

Posted on
Thu Jun 26, 2014 3:13 pm
matt (support) offline
Site Admin
User avatar
Posts: 21429
Joined: Jan 27, 2003
Location: Texas

Re: [ANSWERED]: Suppress Error Logging For Refreshing URL?

How about just:

return u"couldn't load image"

Image

Posted on
Thu Jun 26, 2014 3:20 pm
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: [ANSWERED]: Suppress Error Logging For Refreshing URL?

Bingo, many thanks Matt.

Carl

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests