No status line received - the server has closed the connection
See original GitHub issueI’m submitting a …
- bug report
- feature request
- support request
General infomration
Netflix logs in correctly, and lists users. Selecting a user results in an error message that suggests looking at the log for more information.
Prerequisites
- Are you running the latest version?
Description
Log presents this information:
2019-08-25 12:22:58.806 T:139716896749312 ERROR: Traceback (most recent call last):
2019-08-25 12:22:58.806 T:139716896749312 ERROR: File "/usr/lib/python2.7/SocketServer.py", line 293, in _handle_request_noblock
2019-08-25 12:22:58.806 T:139716896749312 ERROR: self.process_request(request, client_address)
2019-08-25 12:22:58.806 T:139716896749312 ERROR: File "/usr/lib/python2.7/SocketServer.py", line 321, in process_request
2019-08-25 12:22:58.806 T:139716896749312 ERROR: self.finish_request(request, client_address)
2019-08-25 12:22:58.806 T:139716896749312 ERROR: File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
2019-08-25 12:22:58.806 T:139716896749312 ERROR: self.RequestHandlerClass(request, client_address, self)
2019-08-25 12:22:58.806 T:139716896749312 ERROR: File "/usr/lib/python2.7/SocketServer.py", line 655, in __init__
2019-08-25 12:22:58.806 T:139716896749312 ERROR: self.handle()
2019-08-25 12:22:58.806 T:139716896749312 ERROR: File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
2019-08-25 12:22:58.806 T:139716896749312 ERROR: self.handle_one_request()
2019-08-25 12:22:58.806 T:139716896749312 ERROR: File "/usr/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
2019-08-25 12:22:58.806 T:139716896749312 ERROR: method()
2019-08-25 12:22:58.806 T:139716896749312 ERROR: File "/home/xbmc//.kodi/addons/plugin.video.netflix/resources/lib/NetflixHttpRequestHandler.py", line 50, in do_GET
2019-08-25 12:22:58.806 T:139716896749312 ERROR: result = getattr(self.server.res_handler, method)(params)
2019-08-25 12:22:58.806 T:139716896749312 ERROR: File "/home/xbmc//.kodi/addons/plugin.video.netflix/resources/lib/NetflixHttpSubRessourceHandler.py", line 343, in switch_profile
2019-08-25 12:22:58.806 T:139716896749312 ERROR: account=self.credentials)
2019-08-25 12:22:58.806 T:139716896749312 ERROR: File "/home/xbmc//.kodi/addons/plugin.video.netflix/resources/lib/NetflixSession.py", line 365, in switch_profile
2019-08-25 12:22:58.806 T:139716896749312 ERROR: params=payload)
2019-08-25 12:22:58.806 T:139716896749312 ERROR: File "/home/xbmc//.kodi/addons/plugin.video.netflix/resources/lib/NetflixSession.py", line 2044, in _session_get
2019-08-25 12:22:58.806 T:139716896749312 ERROR: url = self._get_api_url_for(component=component)
2019-08-25 12:22:58.806 T:139716896749312 ERROR: File "/home/xbmc//.kodi/addons/plugin.video.netflix/resources/lib/NetflixSession.py", line 1738, in _get_api_url_for
2019-08-25 12:22:58.806 T:139716896749312 ERROR: has_base_url = api_root.find(base_url) > -1
2019-08-25 12:22:58.806 T:139716896749312 ERROR: TypeError: coercing to Unicode: need string or buffer, NoneType found
2019-08-25 12:22:58.808 T:139718197524224 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
Error Type: <class 'httplib.BadStatusLine'>
Error Contents: No status line received - the server has closed the connection
Traceback (most recent call last):
File "/home/xbmc//.kodi/addons/plugin.video.netflix/addon.py", line 33, in <module>
NAVIGATION.router(paramstring=REQUEST_PARAMS)
File "/home/xbmc//.kodi/addons/plugin.video.netflix/resources/lib/utils.py", line 60, in wrapped
result = func(*args, **kwargs)
File "/home/xbmc//.kodi/addons/plugin.video.netflix/resources/lib/Navigation.py", line 123, in router
options = self.before_routing_action(params=params)
File "/home/xbmc//.kodi/addons/plugin.video.netflix/resources/lib/utils.py", line 60, in wrapped
result = func(*args, **kwargs)
File "/home/xbmc//.kodi/addons/plugin.video.netflix/resources/lib/Navigation.py", line 901, in before_routing_action
'profile_id': profile_id})
File "/home/xbmc//.kodi/addons/plugin.video.netflix/resources/lib/Navigation.py", line 1053, in call_netflix_service
data = urllib2.urlopen(full_url).read()
File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 429, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 447, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1228, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1201, in do_open
r = h.getresponse(buffering=True)
File "/usr/lib/python2.7/httplib.py", line 1121, in getresponse
response.begin()
File "/usr/lib/python2.7/httplib.py", line 438, in begin
version, status, reason = self._read_status()
File "/usr/lib/python2.7/httplib.py", line 402, in _read_status
raise BadStatusLine("No status line received - the server has closed the connection")
BadStatusLine: No status line received - the server has closed the connection
-->End of Python script error report<--
2019-08-25 12:22:58.877 T:139718197524224 WARNING: CPythonInvoker(18, /home/xbmc//.kodi/addons/plugin.video.netflix/addon.py): the python script "/home/xbmc//.kodi/addons/plugin.video.netflix/addon.py" has left several classes in memory that we couldn't clean up. The classes include: N9XBMCAddon9xbmcaddon5AddonE
2019-08-25 12:22:58.879 T:139716888356608 ERROR: GetDirectory - Error getting plugin://plugin.video.netflix/?action=video_lists&profile_id=43OK53VFYBDRNIXCRUGFRCVFJY
2019-08-25 12:22:58.881 T:139718342654656 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.netflix/?action=video_lists&profile_id=43OK53VFYBDRNIXCRUGFRCVFJY) failed
Other addons (including those which access the internet) work correctly, and I can access the internet on this computer just fine, which suggests that something is malformed with the request.
Steps to Reproduce
Open Netflix Addon Sign in Select user Receive error message
Expected behavior: Continue to search for videos
Actual behavior: Error message, no forward progress
Context (Environment)
Kodi 18.3 Arch Linux (up to date)
Installation
- I installed the plugin via zip from the Releases page
- I´m using the Netflix Repo
- I´m using a different source (Please tell which)
Operating System
- Linux (x86/x64)
- OSX (x86/x64)
- Windows (x86/x64)
- Linux (ARM)
- Android
Additional informatin on the environment
Arch linux, kernel 6.2.9.arch1-1-x86_64 python2.7 and python 3.7.4
Debug log
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top Results From Across the Web
Why am I getting this error in python ? (httplib) - Stack Overflow
Accordig to GmailAPI (python), it happens when the server closes the connection before sending a valid respone. Indeed, this only happened ...
Read more >python - error connecting to linux server from windows client
BadStatusLine : No status line received - the server closed the connection. The system throws urllib2.URLError [Error 10061] - No connection ...
Read more >Server Side error and ProtocolError: ('Connection aborted ...
Server Side error and ProtocolError: ('Connection aborted.', BadStatusLine('No status line received - the server has closed the connection',)).
Read more >Failed: ('Connection aborted.', BadStatusLine('No status line ...
Hello Team , we are getting this error and changes are not updating on client check_mk server . Failed: ('Connection aborted.
Read more >Issue 42432: Http client, Bad Status Line triggered for no reason
Actual Result Requests is closing the connection. ## Reproduction Steps ### Setup a server that answers the line above bash: ```while 1;do ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I did debug this, and figured its already fixed in this commit: https://github.com/asciidisco/plugin.video.netflix/commit/34c8910b94e57127b2ebfc46bbbac5f7a8588341 The current release does include this fix. https://github.com/asciidisco/plugin.video.netflix/releases/tag/0.13.23 So the solution is to update the plugin.
However, for some reason the update mechanism inside kodi did not give me the newest version. I had to to it manually. I did not further investigate why the update failed, I was to lazy for that.
Sorry for taking so long to get back to this, real life got in the way once again.
It does look like the problem has been fixed.
However, it also appears that this project has been abandoned, and that https://github.com/CastagnaIT/plugin.video.netflix/ is the follow up project. Explains why install from repository didn’t work.
Either way, seems sane to close the ticket at this point 😃