Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting ChromeDriver ... ^CTraceback (most recent call last): File "/home/william/Área de Trabalho/TinderBotz/quickstart.py", line 10, in <module> #72

Open
WilliamEstrela opened this issue Dec 29, 2021 · 6 comments

Comments

@WilliamEstrela
Copy link

root@latitude:/home/william/Área de Trabalho/TinderBotz# python3 quickstart.py 
Getting ChromeDriver ...
^CTraceback (most recent call last):
  File "/home/william/Área de Trabalho/TinderBotz/quickstart.py", line 10, in <module>
    session = Session()
  File "/home/william/Área de Trabalho/TinderBotz/tinderbotz/session.py", line 111, in __init__
    self.browser = uc.Chrome(options=options) #ChromeDriverManager().install(),
  File "/usr/local/lib/python3.9/dist-packages/undetected_chromedriver/__init__.py", line 369, in __init__
    super(Chrome, self).__init__(
  File "/usr/local/lib/python3.9/dist-packages/selenium/webdriver/chrome/webdriver.py", line 70, in __init__
    super(WebDriver, self).__init__(DesiredCapabilities.CHROME['browserName'], "goog",
  File "/usr/local/lib/python3.9/dist-packages/selenium/webdriver/chromium/webdriver.py", line 93, in __init__
    RemoteWebDriver.__init__(
  File "/usr/local/lib/python3.9/dist-packages/selenium/webdriver/remote/webdriver.py", line 268, in __init__
    self.start_session(capabilities, browser_profile)
  File "/usr/local/lib/python3.9/dist-packages/undetected_chromedriver/__init__.py", line 552, in start_session
    super(selenium.webdriver.chrome.webdriver.WebDriver, self).start_session(
  File "/usr/local/lib/python3.9/dist-packages/selenium/webdriver/remote/webdriver.py", line 359, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/usr/local/lib/python3.9/dist-packages/selenium/webdriver/remote/webdriver.py", line 422, in execute
    response = self.command_executor.execute(driver_command, params)
  File "/usr/local/lib/python3.9/dist-packages/selenium/webdriver/remote/remote_connection.py", line 421, in execute
    return self._request(command_info[0], url, body=data)
  File "/usr/local/lib/python3.9/dist-packages/selenium/webdriver/remote/remote_connection.py", line 443, in _request
    resp = self._conn.request(method, url, body=body, headers=headers)
  File "/usr/lib/python3/dist-packages/urllib3/request.py", line 78, in request
    return self.request_encode_body(
  File "/usr/lib/python3/dist-packages/urllib3/request.py", line 170, in request_encode_body
    return self.urlopen(method, url, **extra_kw)
  File "/usr/lib/python3/dist-packages/urllib3/poolmanager.py", line 375, in urlopen
    response = conn.urlopen(method, u.request_uri, **kw)
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 445, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 440, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/lib/python3.9/http/client.py", line 1371, in getresponse
    response.begin()
  File "/usr/lib/python3.9/http/client.py", line 319, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.9/http/client.py", line 280, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/lib/python3.9/socket.py", line 704, in readinto
    return self._sock.recv_into(b)
KeyboardInterrupt
/==============\
| Tinderbotz   |
| ----------   |
| duration: 42 |
| like: 0      |
| dislike: 0   |
| superlike: 0 |
\==============/
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/home/william/Área de Trabalho/TinderBotz/tinderbotz/session.py", line 68, in cleanup
    print("Started session: {}".format(self.started))
AttributeError: 'Session' object has no attribute 'started'

root@latitude:/home/william/Área de Trabalho/TinderBotz# python3 setup.py 
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: no commands supplied
root@latitude:/home/william/Área de Trabalho/TinderBotz# python3 setup.py
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: no commands supplied
root@latitude:/home/william/Área de Trabalho/TinderBotz# py
Comando 'py' não encontrado, mas poder ser instalado com:
apt install pythonpy
root@latitude:/home/william/Área de Trabalho/TinderBotz# python3 quickstart.py 
Getting ChromeDriver ...








Traceback (most recent call last):
  File "/home/william/Área de Trabalho/TinderBotz/quickstart.py", line 10, in <module>
    session = Session()
  File "/home/william/Área de Trabalho/TinderBotz/tinderbotz/session.py", line 111, in __init__
    self.browser = uc.Chrome(options=options) #ChromeDriverManager().install(),
  File "/usr/local/lib/python3.9/dist-packages/undetected_chromedriver/__init__.py", line 369, in __init__
    super(Chrome, self).__init__(
  File "/usr/local/lib/python3.9/dist-packages/selenium/webdriver/chrome/webdriver.py", line 70, in __init__
    super(WebDriver, self).__init__(DesiredCapabilities.CHROME['browserName'], "goog",
  File "/usr/local/lib/python3.9/dist-packages/selenium/webdriver/chromium/webdriver.py", line 93, in __init__
    RemoteWebDriver.__init__(
  File "/usr/local/lib/python3.9/dist-packages/selenium/webdriver/remote/webdriver.py", line 268, in __init__
    self.start_session(capabilities, browser_profile)
  File "/usr/local/lib/python3.9/dist-packages/undetected_chromedriver/__init__.py", line 552, in start_session
    super(selenium.webdriver.chrome.webdriver.WebDriver, self).start_session(
  File "/usr/local/lib/python3.9/dist-packages/selenium/webdriver/remote/webdriver.py", line 359, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/usr/local/lib/python3.9/dist-packages/selenium/webdriver/remote/webdriver.py", line 424, in execute
    self.error_handler.check_response(response)
  File "/usr/local/lib/python3.9/dist-packages/selenium/webdriver/remote/errorhandler.py", line 247, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot connect to chrome at 127.0.0.1:33461
from chrome not reachable
Stacktrace:
#0 0x5570bd262ee3 <unknown>
#1 0x5570bcd3049f <unknown>
#2 0x5570bcd1f169 <unknown>
#3 0x5570bcd56d1f <unknown>
#4 0x5570bcd4ec46 <unknown>
#5 0x5570bcd89f45 <unknown>
#6 0x5570bcd84163 <unknown>
#7 0x5570bcd59bfc <unknown>
#8 0x5570bcd5ac05 <unknown>
#9 0x5570bd294baa <unknown>
#10 0x5570bd2aa651 <unknown>
#11 0x5570bd295b05 <unknown>
#12 0x5570bd2aba68 <unknown>
#13 0x5570bd28a05f <unknown>
#14 0x5570bd2c6818 <unknown>
#15 0x5570bd2c6998 <unknown>
#16 0x5570bd2e1eed <unknown>
#17 0x7fe0ca316927 <unknown>

/==============\
| Tinderbotz   |
| ----------   |
| duration: 62 |
| like: 0      |
| dislike: 0   |
| superlike: 0 |
\==============/
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/home/william/Área de Trabalho/TinderBotz/tinderbotz/session.py", line 68, in cleanup
    print("Started session: {}".format(self.started))
AttributeError: 'Session' object has no attribute 'started'
@philffm
Copy link

philffm commented Jan 6, 2022

Same issue here - maybe it works with an older chrome version?

@philffm
Copy link

philffm commented Jan 6, 2022

For me it works when leaving out the user data dir - but that's just a workaround :)

# options.add_argument(f"--user-data-dir={user_data}")

also had to comment out the proxy, otherwise chrome wouldn't connect

# session = Session(proxy="23.23.23.23:3128")

@WilliamEstrela
Copy link
Author

Show, I made your process, put it in windows and logged in with gmail and it worked :)

@eliac7
Copy link

eliac7 commented Jan 8, 2022

So guys, how did you fix that error?

AttributeError: 'Session' object has no attribute 'started'

Fixed it:
Updated to the latest Chrome version (97.0.4692.71) and re install the packages.

@Hughesy
Copy link

Hughesy commented Jan 13, 2022

So guys, how did you fix that error?

AttributeError: 'Session' object has no attribute 'started'

Fixed it: Updated to the latest Chrome version (97.0.4692.71) and re install the packages.

I tried this and still get the same error

@frederikme
Copy link
Owner

@Hughesy , What python version are you using? I believe only 3.6 - 3.9 is compatible for the moment.
If you're using the right python version, then the issue should not be
AttributeError: 'Session' object has no attribute 'started'
but instead the real issue would be a bit further up in the logs. Probably somewhere when initialising Session().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants