0

When I try to run my functional tests, I get: selenium http.client.BadStatusLine: '' (full error below). The tests start to run, the first one returns an error, than it gets hung up and I have to manually interrupt. (The first error is an expected error, so don't worry about that.)

This was working perfectly last night; I don't know what happened.

I tried upgrading Selenium (said I already had the most recent), and I upgraded Firefox. Didn't make a difference.

Any ideas?

Creating test database for alias 'default'...
E^CE
======================================================================
ERROR: test_menu_displays (functional_tests.tests.EditorTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/larapsodia/dict/dev/functional_tests/tests.py", line 52, in test_menu_displays
    quickadd_button_text = self.browser.find_element_by_id('id_quickadd').text
  File "/home/larapsodia/.virtualenvs/django18/lib/python3.4/site-packages/selenium/webdriver/remote/webdriver.py", line 269, in find_element_by_id
    return self.find_element(by=By.ID, value=id_)
  File "/home/larapsodia/.virtualenvs/django18/lib/python3.4/site-packages/selenium/webdriver/remote/webdriver.py", line 752, in find_element
    'value': value})['value']
  File "/home/larapsodia/.virtualenvs/django18/lib/python3.4/site-packages/selenium/webdriver/remote/webdriver.py", line 236, in execute
    self.error_handler.check_response(response)
  File "/home/larapsodia/.virtualenvs/django18/lib/python3.4/site-packages/selenium/webdriver/remote/errorhandler.py", line 192, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: {"method":"id","selector":"id_quickadd"}
Stacktrace:
    at FirefoxDriver.findElementInternal_ (file:///tmp/tmplqx8mg0p/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
    at fxdriver.Timer.setTimeout/<.notify (file:///tmp/tmplqx8mg0p/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
======================================================================
ERROR: test_page_displays (functional_tests.tests.EditorTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/larapsodia/dict/dev/functional_tests/tests.py", line 32, in test_page_displays
    self.browser.get(EDITOR_DEV_SITE_URL)
  File "/home/larapsodia/.virtualenvs/django18/lib/python3.4/site-packages/selenium/webdriver/remote/webdriver.py", line 248, in get
    self.execute(Command.GET, {'url': url})
  File "/home/larapsodia/.virtualenvs/django18/lib/python3.4/site-packages/selenium/webdriver/remote/webdriver.py", line 234, in execute
    response = self.command_executor.execute(driver_command, params)
  File "/home/larapsodia/.virtualenvs/django18/lib/python3.4/site-packages/selenium/webdriver/remote/remote_connection.py", line 401, in exe
cute
    return self._request(command_info[0], url, body=data)
  File "/home/larapsodia/.virtualenvs/django18/lib/python3.4/site-packages/selenium/webdriver/remote/remote_connection.py", line 433, in _re
quest
    resp = self._conn.getresponse()
  File "/usr/lib/python3.4/http/client.py", line 1171, in getresponse
    response.begin()
  File "/usr/lib/python3.4/http/client.py", line 351, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.4/http/client.py", line 321, in _read_status
    raise BadStatusLine(line)
http.client.BadStatusLine: ''
larapsodia
  • 594
  • 4
  • 15

1 Answers1

0

I still don't know what happened, but this morning it's working again. I didn't change any code or anything.

Weird Selenium.

larapsodia
  • 594
  • 4
  • 15
  • I'm not sure if this will help since it's up and working again but check out the post this guy has: http://stackoverflow.com/questions/27619258/httplib-badstatusline specifically in the linked Python Docs. It sounds like your server threw back a status that couldn't be understood (So not a 200 or 404 or 500 or something common maybe?). My guess is something happened to your server causing the "temporary hiccup". Have you checked to see if something was done with the server? – Michael Platt Aug 22 '16 at 14:17