TweetToaster icon indicating copy to clipboard operation
TweetToaster copied to clipboard

后端接口报SessionNotCreatedException,请教一下这是什么问题

Open gadfly3173 opened this issue 4 years ago • 0 comments

pm2中celery-run-error.log输出的日志:

[2020-04-09 09:57:46,658: INFO/MainProcess] Received task: Matsuri_translation.manager.execute_event[57f8ca99-0a41-4246-9384-f6f118ed8a0d]  
[2020-04-09 10:02:40,949: ERROR/ForkPoolWorker-1] Task Matsuri_translation.manager.execute_event[57f8ca99-0a41-4246-9384-f6f118ed8a0d] raised unexpected: SessionNotCreatedException('session not created\nfrom disconnected: received Inspector.detached event\n  (Session info: headless chrome=79.0.3945.130)', None, None)
Traceback (most recent call last):
  File "/home/gadflyFang/.local/share/virtualenvs/matsuri_translation-kPn8hfyq/lib/python3.7/site-packages/celery/app/trace.py", line 385, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/home/gadflyFang/.local/share/virtualenvs/matsuri_translation-kPn8hfyq/lib/python3.7/site-packages/celery/app/trace.py", line 648, in __protected_call__
    return self.run(*args, **kwargs)
  File "/home/matsuri_translation/Matsuri_translation/manager.py", line 44, in execute_event
    driver = webdriver.Chrome(options=chrome_options)
  File "/home/gadflyFang/.local/share/virtualenvs/matsuri_translation-kPn8hfyq/lib/python3.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 81, in __init__
    desired_capabilities=desired_capabilities)
  File "/home/gadflyFang/.local/share/virtualenvs/matsuri_translation-kPn8hfyq/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "/home/gadflyFang/.local/share/virtualenvs/matsuri_translation-kPn8hfyq/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/home/gadflyFang/.local/share/virtualenvs/matsuri_translation-kPn8hfyq/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/home/gadflyFang/.local/share/virtualenvs/matsuri_translation-kPn8hfyq/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: session not created
from disconnected: received Inspector.detached event
  (Session info: headless chrome=79.0.3945.130)

gadfly3173 avatar Apr 09 '20 02:04 gadfly3173