Core: Error trying to parse headers from cheap IP Camera

Created on 12 Apr 2016  路  8Comments  路  Source: home-assistant/core

Home Assistant release (hass --version): 0.17.2
Python release (python3 --version): 3.4.2 (armbian / orangepi)
Component/platform: camera / mjpeg
Description of problem: log warning

Hi. I have an old Tenvis MJPEG IP Camera and every time that Home Assistant tries to fetch an thumbnail, I get this error:

16-04-12 03:07:41 requests.packages.urllib3.connectionpool: Failed to parse headers (url=http://192.168.1.4:81/videostream.cgi): [StartBoundaryNotFoundDefect(), MultipartInvariantViolationDefect()], unparsed data: '' Traceback (most recent call last): File "/usr/local/home-assistant/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 390, in _make_request assert_header_parsing(httplib_response.msg) File "/usr/local/home-assistant/lib/python3.4/site-packages/requests/packages/urllib3/util/response.py", line 59, in assert_header_parsing raise HeaderParsingError(defects=defects, unparsed_data=unparsed_data) requests.packages.urllib3.exceptions.HeaderParsingError: [StartBoundaryNotFoundDefect(), MultipartInvariantViolationDefect()], unparsed data: ''

Thanks!

Most helpful comment

I think you need to filter the requests package, ie:

logger:
  default: warning
  logs:
    requests.packages.urllib3.connectionpool: critical

All 8 comments

This is a known issue with urllib3 and can be safely ignored. See also note in the docs: https://home-assistant.io/components/camera.mjpeg/

Is there any way to mute these erros? My logs are cluttered because of this...

Thanks!!

I second wanting to mute it in the logs. Any ideas?

I'm getting the same warning, a way to suppress them would be wonderful.

@balloob This doesn't work, any idea?

logger:
  default: warning
  logs:
    homeassistant.components.camera: critical

EDIT: It works @kipwittchen @jschwalbe @qrioniclabs @equake I've set logger to this in my configuration.yaml and it stopped outputting stuff in the logfile. Maybe @balloob knows the exact thing to write to not disable every component cause _homeassistant.components.camera: critical_ doesn't work for me.

logger:
  default: critical

I think you need to filter the requests package, ie:

logger:
  default: warning
  logs:
    requests.packages.urllib3.connectionpool: critical

Yep, it works. Thanks a lot 馃憤

@MartinHjelmare - THANK YOU!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aweb-01 picture aweb-01  路  3Comments

moskovskiy82 picture moskovskiy82  路  3Comments

Elmardus picture Elmardus  路  3Comments

MartinHjelmare picture MartinHjelmare  路  3Comments

sh0rez picture sh0rez  路  3Comments