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

Support New Chrome and undetected-chromedriver Versions #130

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MAbdElRaouf
Copy link

@MAbdElRaouf MAbdElRaouf commented Jan 15, 2024

This is to address issues #123 and #126.

  • Bumped selenium (4.16.0), undetected-chromedriver (3.5.4), and webdriver-manager (4.0.1) to support the newest Chrome versions (114 and above).

  • Removed ".v2" from "import undetected_chromedriver.v2" to address new version importing issue.

  • Moved self.started attribute declaration to line 51 so that line 71 doesn't raise "no attribute 'started'" exception.

Tested with Chrome v120 and confirmed everything runs smoothly.

- Removed ".v2" from undetected_chromedriver.v2 to address new version importing issue.

- Moved self.started attribute declaration to line frederikme#51 so that the print in line frederikme#71 doesn't raise "no attribute 'started'".
- Bumped selenium (4.16.0), undetected-chromedriver (3.5.4), and webdriver-manager (4.0.1) to support the newest Chrome versions (114 and above).
@Lembo-Lembo
Copy link

Thank you for your update! Unfortunately, I encountered the same problem and the solution provided didn't work for me. I'm new to Python and would appreciate any help.

Here are the details of my setup:

  • Windows x64
  • Google Chrome for Testing 121.0.6167.85 and Google Chrome 121.0.6167.140 (tried both)
  • Chromebrowser 121.0.6167.85
  • Selenium 4.16.0
  • Undetected-chromedriver 3.5.4
  • Webdriver-manager 4.0.1
  • Pillow 10.0.1 (also tried 10.2.0)
  • Deepface 0.0.84
  • Opencv-python 4.9.0.80

C:\TinderBotz-master>py auto_swipe.py
Getting ChromeDriver ...
Traceback (most recent call last):
File "C:\TinderBotz-master\auto_swipe.py", line 14, in
session = Session()
^^^^^^^^^
File "C:\TinderBotz-master\tinderbotz\session.py", line 117, in init
self.browser = uc.Chrome(options=options) # ChromeDriverManager().install(),
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\script\AppData\Local\Programs\Python\Python312\Lib\site-packages\undetected_chromedriver_init_.py", line 421, in init
browser = subprocess.Popen(
^^^^^^^^^^^^^^^^^
File "C:\Users\script\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 1026, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\script\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 1462, in _execute_child
args = list2cmdline(args)
^^^^^^^^^^^^^^^^^^
File "C:\Users\script\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 608, in list2cmdline
for arg in map(os.fsdecode, seq):
File "", line 830, in fsdecode
TypeError: expected str, bytes or os.PathLike object, not NoneType
/==============\

Tinderbotz
duration: 1
like: 0
dislike: 0
superlike: 0
==============/
Started session: 2024-02-06 22:22:51
Ended session: 2024-02-06 22:22:53
Exception ignored in atexit callback: <function Session.init..cleanup at 0x000002638A23A2A0>
Traceback (most recent call last):
File "C:\TinderBotz-master\tinderbotz\session.py", line 76, in cleanup
self.browser.quit()
^^^^^^^^^^^^

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

C:\TinderBotz-master>

@Mighty-Cuet-Kitty
Copy link

I got mine working, in session.py uncomment "self.browser.quit()" by adding a # infront. For me its line 74. All of the changes above from the first guy has to be made. Manually update undetected-chromedriver like this: (pip install --upgrade undetected-chromedriver) without the ( ) brackets. Mine installed version 3.5.5 and then i just had to update chrome to version 126.

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

Successfully merging this pull request may close these issues.

None yet

3 participants