Django環境構築記録
3634 ワード
環境:
**Fedora 24 X 64**python 3.5(付属)Django 1.9 selenium(2.53.6)Firefox 47.01
ビルドレコード
1.
検索:http://stackoverflow.com/questions/34827566/attributeerror-module-html-parser-has-no-attribute-htmlparseerror
As you can read here this error is raised... because HTMLParseError is deprecated from Python 3.3 onwards and removed in Python 3.5. what you can do is downgrade your Python version or upgrade your Django version.
解決策:Djangoを1.9にアップグレードするかpythonバージョンを下げる
2.selenium起動Firefoxエラー
またはこのエラーメッセージ:
検索結果:http://stackoverflow.com/questions/37693106/selenium-2-53-not-working-on-firefox-47/37693374
解決策:
7月3日更新:最新バージョンのFirefoxはすでに2.53バージョンのseleniumピットをサポートしています!
**Fedora 24 X 64**python 3.5(付属)Django 1.9 selenium(2.53.6)Firefox 47.01
ビルドレコード
1.
Django 1.7
を使用した場合、次のエラーが発生しました. File "/usr/lib/python3.5/site-packages/django/utils/html_parser.py", line 12, in
HTMLParseError = _html_parser.HTMLParseErro
検索:http://stackoverflow.com/questions/34827566/attributeerror-module-html-parser-has-no-attribute-htmlparseerror
As you can read here this error is raised... because HTMLParseError is deprecated from Python 3.3 onwards and removed in Python 3.5. what you can do is downgrade your Python version or upgrade your Django version.
解決策:Djangoを1.9にアップグレードするかpythonバージョンを下げる
2.selenium起動Firefoxエラー
Traceback (most recent call last):
browser = webdriver.Firefox()
File "/usr/lib/python3.5/site-packages/selenium/webdriver/firefox/webdriver.py", line 80, in __init__
self.binary, timeout)
File "/usr/lib/python3.5/site-packages/selenium/webdriver/firefox/extension_connection.py", line 52, in __init__
self.binary.launch_browser(self.profile, timeout=timeout)
File "/usr/lib/python3.5/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 68, in launch_browser
self._wait_until_connectable(timeout=timeout)
File "/usr/lib/python3.5/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 99, in _wait_until_connectable
"The browser appears to have exited "
selenium.common.exceptions.WebDriverException: Message: The browser appears to have exited before we could connect. If you specified a log_file in the FirefoxBinary constructor, check it for details.
またはこのエラーメッセージ:
Traceback (most recent call last):
File "functional_test.py", line 4, in
browser = webdriver.Firefox()
File "/usr/lib/python3.5/site-packages/selenium/webdriver/firefox/webdriver.py", line 85, in __init__
keep_alive=True)
File "/usr/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 90, in __init__
self.start_session(desired_capabilities, browser_profile)
File "/usr/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 177, in start_session
response = self.execute(Command.NEW_SESSION, capabilities)
File "/usr/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 234, in execute
response = self.command_executor.execute(driver_command, params)
File "/usr/lib/python3.5/site-packages/selenium/webdriver/remote/remote_connection.py", line 401, in execute
return self._request(command_info[0], url, body=data)
File "/usr/lib/python3.5/site-packages/selenium/webdriver/remote/remote_connection.py", line 433, in _request
resp = self._conn.getresponse()
File "/usr/lib64/python3.5/http/client.py", line 1174, in getresponse
response.begin()
File "/usr/lib64/python3.5/http/client.py", line 282, in begin
version, status, reason = self._read_status()
File "/usr/lib64/python3.5/http/client.py", line 243, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib64/python3.5/socket.py", line 575, in readinto
return self._sock.recv_into(b)
ConnectionResetError: [Errno 104] Connection reset by peer
検索結果:http://stackoverflow.com/questions/37693106/selenium-2-53-not-working-on-firefox-47/37693374
解決策:
Firefox
バージョンから46以下に削減7月3日更新:最新バージョンのFirefoxはすでに2.53バージョンのseleniumピットをサポートしています!