我要领券网 > Homeclick.com优惠码 > Homeclick.com

点评
-
首页 上一页 1 下一页 末页
Homeclick.com的评论
selenium.common.exceptions.WebDriverException
selenium.common.exceptions.WebDriverException: Message: unknown error: DevToolsActivePort file doesn't exist
Traceback (most recent call last)
File "C:\anaconda3\lib\site-packages\flask\app.py", line 2309, in
__call__def __call__(self, environ, start_response):"""The WSGI server calls the Flask application object as theWSGI application. This calls :meth:`wsgi_app` which can bewrapped to applying middleware."""return self.wsgi_app(environ, start_response)def __repr__(self):return '<%s %r>' % (self.__class__.__name__,self.name,File "C:\anaconda3\lib\site-packages\flask\app.py", line 2295, in
wsgi_apptry:ctx.push()response = self.full_dispatch_request()except Exception as e:error = eresponse = self.handle_exception(e)except:error = sys.exc_info()[1]raisereturn response(environ, start_response)finally:File "C:\anaconda3\lib\site-packages\flask\app.py", line 1741, in
handle_exception# if we want to repropagate the exception, we can attempt to# raise it with the whole traceback in case we can do that# (the function was actually called from the except part)# otherwise, we just raise the error againif exc_value is e:reraise(exc_type, exc_value, tb)else:raise eself.log_exception((exc_type, exc_value, tb))if handler is None:File "C:\anaconda3\lib\site-packages\flask\_compat.py", line 35, in
reraisefrom io import StringIOdef reraise(tp, value, tb=None):if value.__traceback__ is not tb:raise value.with_traceback(tb)raise valueimplements_to_string = _identityelse:
text_type = unicodeFile "C:\anaconda3\lib\site-packages\flask\app.py", line 2292, in
wsgi_appctx = self.request_context(environ)error = Nonetry:try:ctx.push()response = self.full_dispatch_request()except Exception as e:error = eresponse = self.handle_exception(e)except:error = sys.exc_info()[1]File "C:\anaconda3\lib\site-packages\flask\app.py", line 1815, in
full_dispatch_requestrequest_started.send(self)rv = self.preprocess_request()if rv is None:rv = self.dispatch_request()except Exception as e:rv = self.handle_user_exception(e)return self.finalize_request(rv)def finalize_request(self, rv, from_error_handler=False):"""Given the return value from a view function this finalizesthe request by converting it into a response and invoking theFile "C:\anaconda3\lib\site-packages\flask\app.py", line 1718, in
handle_user_exceptionreturn self.handle_http_exception(e)handler = self._find_error_handler(e)if handler is None:reraise(exc_type, exc_value, tb)return handler(e)def handle_exception(self, e):"""Default exception handling that kicks in when an exceptionoccurs that is not caught. In debug mode the exception willFile "C:\anaconda3\lib\site-packages\flask\_compat.py", line 35, in
reraisefrom io import StringIOdef reraise(tp, value, tb=None):if value.__traceback__ is not tb:raise value.with_traceback(tb)raise valueimplements_to_string = _identityelse:
text_type = unicodeFile "C:\anaconda3\lib\site-packages\flask\app.py", line 1813, in
full_dispatch_requestself.try_trigger_before_first_request_functions()try:request_started.send(self)rv = self.preprocess_request()if rv is None:rv = self.dispatch_request()except Exception as e:rv = self.handle_user_exception(e)return self.finalize_request(rv)def finalize_request(self, rv, from_error_handler=False):File "C:\anaconda3\lib\site-packages\flask\app.py", line 1799, in
dispatch_request# request came with the OPTIONS method, reply automaticallyif getattr(rule, 'provide_automatic_options', False) \and req.method == 'OPTIONS':return self.make_default_options_response()# otherwise dispatch to the handler for that endpointreturn self.view_functions[rule.endpoint](**req.view_args)def full_dispatch_request(self):"""Dispatches the request and on top of that performs requestpre and postprocessing as well as HTTP exception catching anderror handling.File "C:\pythoncode\google tranlate\app.py", line 252, in
deeplfydef deeplfy():
txt = request.values.get('q') #获取参数print(txt)if not txt:returntranslated = deep_tranlate(txt)return translated@app.route('/getjdlink',methods=['GET','POST'])def getjdlink():
File "C:\pythoncode\google tranlate\app.py", line 42, in
deep_tranlatecaps = DesiredCapabilities().CHROMEcaps["pageLoadStrategy"] ="normal"# Start a Selenium driverdriver_path=r'C:\chrome\chromedriver.exe'driver = webdriver.Chrome(driver_path)# Reach the deepL websitedeepl_url = 'https://www.deepl.com/translator#en/zh/'+text_to_translatedriver.get(deepl_url)driver.implicitly_wait(2)File "C:\anaconda3\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 81, in
__init__RemoteWebDriver.__init__(self,command_executor=ChromeRemoteConnection(remote_server_addr=self.service.service_url,keep_alive=keep_alive),desired_capabilities=desired_capabilities)except Exception:self.quit()raiseself._is_remote = FalseFile "C:\anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in
__init__self.error_handler = ErrorHandler()self.start_client()if browser_profile is not None:warnings.warn("Please use FirefoxOptions to set browser profile",DeprecationWarning, stacklevel=2)self.start_session(capabilities, browser_profile)self._switch_to = SwitchTo(self)self._mobile = Mobile(self)self.file_detector = file_detector or LocalFileDetector()def __repr__(self):File "C:\anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in
start_sessionelse:capabilities.update({'firefox_profile': browser_profile.encoded})w3c_caps = _make_w3c_caps(capabilities)parameters = {"capabilities": w3c_caps,"desiredCapabilities": capabilities}response = self.execute(Command.NEW_SESSION, parameters)if 'sessionId' not in response:response = response['value']self.session_id = response['sessionId']self.capabilities = response.get('value')File "C:\anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in
executeparams['sessionId'] = self.session_idparams = self._wrap_value(params)response = self.command_executor.execute(driver_command, params)if response:self.error_handler.check_response(response)response['value'] = self._unwrap_value(response.get('value', None))return response# If the server doesn't send a response, assume the command was# a successFile "C:\anaconda3\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in
check_responseif 'data' in value:alert_text = value['data'].get('text')elif 'alert' in value:alert_text = value['alert'].get('text')raise exception_class(message, screen, stacktrace, alert_text)raise exception_class(message, screen, stacktrace)def _value_or_default(self, obj, key, default):return obj[key] if key in obj else default
selenium.common.exceptions.WebDriverException: Message: unknown error: DevToolsActivePort file doesn't exist
The debugger caught an exception in your WSGI application. You can now
look at the traceback which led to the error.
If you enable JavaScript you can also use additional features such as code
execution (if the evalex feature is enabled), automatic pasting of the
exceptions and much more.
Console Locked
The console is locked and needs to be unlocked by entering the PIN. You can find the PIN printed out on the standard output of your shell that runs the server.

















































