-
Notifications
You must be signed in to change notification settings - Fork 188
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
Problem with chrome driver on Raspberry Pi #358
Comments
Exec format error would imply you have the wrong architecture for your
undetected_chromedriver binary. What is the output of `file` for the
undetected_chromedriver binary, and what does `uname -a` say?
Arthur
Simon Krukowski ***@***.***> schrieb am So., 9. Apr. 2023,
13:50:
… I'm trying to set up flathunter on my Raspberry Pi 4 running Debian
GNU/Linux 11 (bullseye), but get a problem when running flat hunt.py. It
seems to be related to the Chromium Driver and #192
<#192>. I have the newest
chromium driver (109.0.5414.112-rpt2). The error looks like this:
***@***.***:~/Documents/flathunter $ pipenv run python flathunt.py
[2023/04/09 13:42:28|config.py |INFO ]: Using config path
/home/simon/Documents/flathunter/config.yaml [2023/04/09
13:42:28|chrome_wrapper.py |INFO ]: Initializing Chrome WebDriver for
crawler... [2023/04/09 13:42:30|patcher.py |INFO ]: patching driver
executable
/home/simon/.local/share/undetected_chromedriver/undetected_chromedriver
Traceback (most recent call last): File
"/home/simon/Documents/flathunter/flathunt.py", line 118, in <module>
main() File "/home/simon/Documents/flathunter/flathunt.py", line 114, in
main launch_flat_hunt(config, heartbeat) File
"/home/simon/Documents/flathunter/flathunt.py", line 36, in
launch_flat_hunt hunter.hunt_flats() File
"/home/simon/Documents/flathunter/flathunter/hunter.py", line 56, in
hunt_flats for expose in
processor_chain.process(self.crawl_for_exposes(max_pages)): File
"/home/simon/Documents/flathunter/flathunter/hunter.py", line 35, in
crawl_for_exposes return chain(*[try_crawl(searcher, url, max_pages) File
"/home/simon/Documents/flathunter/flathunter/hunter.py", line 35, in
<listcomp> return chain(*[try_crawl(searcher, url, max_pages) File
"/home/simon/Documents/flathunter/flathunter/hunter.py", line 27, in
try_crawl return searcher.crawl(url, max_pages) File
"/home/simon/Documents/flathunter/flathunter/abstract_crawler.py", line
150, in crawl return self.get_results(url, max_pages) File
"/home/simon/Documents/flathunter/flathunter/crawler/immobilienscout.py",
line 90, in get_results soup = self.get_page(search_url, self.get_driver(),
page_no) File
"/home/simon/Documents/flathunter/flathunter/crawler/immobilienscout.py",
line 65, in get_driver self.driver = get_chrome_driver(driver_arguments)
File "/home/simon/Documents/flathunter/flathunter/chrome_wrapper.py", line
47, in get_chrome_driver driver = uc.Chrome(version_main=chrome_version,
options=chrome_options) # pylint: disable=no-member File
"/home/simon/.local/share/virtualenvs/flathunter-QaHh8Mme/lib/python3.9/site-packages/undetected_chromedriver/__init__.py",
line 441, in __init__ super(Chrome, self).__init__( File
"/home/simon/.local/share/virtualenvs/flathunter-QaHh8Mme/lib/python3.9/site-packages/selenium/webdriver/chrome/webdriver.py",
line 80, in __init__ super().__init__( File
"/home/simon/.local/share/virtualenvs/flathunter-QaHh8Mme/lib/python3.9/site-packages/selenium/webdriver/chromium/webdriver.py",
line 101, in __init__ self.service.start() File
"/home/simon/.local/share/virtualenvs/flathunter-QaHh8Mme/lib/python3.9/site-packages/selenium/webdriver/common/service.py",
line 90, in start self._start_process(self.path) File
"/home/simon/.local/share/virtualenvs/flathunter-QaHh8Mme/lib/python3.9/site-packages/selenium/webdriver/common/service.py",
line 203, in _start_process self.process = subprocess.Popen( File
"/usr/lib/python3.9/subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds, File
"/usr/lib/python3.9/subprocess.py", line 1823, in _execute_child raise
child_exception_type(errno_num, err_msg, err_filename) OSError: [Errno 8]
Exec format error:
'/home/simon/.local/share/undetected_chromedriver/undetected_chromedriver'
[2023/04/09 13:42:30|__init__.py |INFO ]: ensuring close
I tried the steps described by @Ralfons-06 <https://github.com/Ralfons-06>
in #192 <#192>, but it
seems the code changed so I'm unsure how to proceed. Any ideas? Thanks!
—
Reply to this email directly, view it on GitHub
<#358>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAEK5QE6RNPEJJY5ZA4CPLXAKPBVANCNFSM6AAAAAAWYB725Y>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Hey, thanks for the quick reply. |
The latest Pi OS has a 64-bit kernel and a 32-bit OS, which throws off any software installer using Anyway, I did this to downgrade my kernel to the previous, 32-bit version:
While I cannot guarantee that will fix your issue, it is probably a good place to start to get your system in a more predictable state. After a reboot,
This did fix similar problems I was having getting chromedriver working after I had previously upgraded the kernel to 6.1. |
Better late than never, finally fixed the issue. It had to do with the I followed the instructions described here to download and patch the unofficial ARM64 If someone comes across the same issue, let me know and I can share the changed code in the |
Hey @mxfilerelatedcache 👋 Would be great if you could share the changes you made in |
Sharing your changes would help me out as well, thanks in advance @mxfilerelatedcache :) |
I have the same problem. Would it possible to share the modified file @mxfilerelatedcache? |
Hey, sorry for the late response, was a bit down under. I'm at work right now but when I get home I'll try to look for my Pi and the respective |
Looking forward to see this. Thank you |
It's been a while so I'm not quite sure about all the places I changed so I'll provide the whole
|
I'm not using the flathunter, but I'm trying to do a scraper of my own. What I already have done works in windows, but I do have issues with UC on my raspberry. I'm running Raspberry OS, but should your solution fix my issue that I have here: |
For anyone still interested, in chrome_wrapper.py, I needed to change this line from driver = uc.Chrome(version_main=chrome_version, options=chrome_options) # pylint: disable=no-member to chrome_options.BinaryLocation = "/usr/bin/chromium-browser"
driver = uc.Chrome(driver_executable_path='/usr/bin/chromedriver', options=chrome_options) # pylint: disable=no-member Of course, make sure that |
I'm trying to set up flathunter on my Raspberry Pi 4 running Debian GNU/Linux 11 (bullseye), but get a problem when running
flat hunt.py
. It seems to be related to the Chromium Driver and #192. I have the newest chromium driver (109.0.5414.112-rpt2). The error looks like this:simon@simonspi:~/Documents/flathunter $ pipenv run python flathunt.py [2023/04/09 13:42:28|config.py |INFO ]: Using config path /home/simon/Documents/flathunter/config.yaml [2023/04/09 13:42:28|chrome_wrapper.py |INFO ]: Initializing Chrome WebDriver for crawler... [2023/04/09 13:42:30|patcher.py |INFO ]: patching driver executable /home/simon/.local/share/undetected_chromedriver/undetected_chromedriver Traceback (most recent call last): File "/home/simon/Documents/flathunter/flathunt.py", line 118, in <module> main() File "/home/simon/Documents/flathunter/flathunt.py", line 114, in main launch_flat_hunt(config, heartbeat) File "/home/simon/Documents/flathunter/flathunt.py", line 36, in launch_flat_hunt hunter.hunt_flats() File "/home/simon/Documents/flathunter/flathunter/hunter.py", line 56, in hunt_flats for expose in processor_chain.process(self.crawl_for_exposes(max_pages)): File "/home/simon/Documents/flathunter/flathunter/hunter.py", line 35, in crawl_for_exposes return chain(*[try_crawl(searcher, url, max_pages) File "/home/simon/Documents/flathunter/flathunter/hunter.py", line 35, in <listcomp> return chain(*[try_crawl(searcher, url, max_pages) File "/home/simon/Documents/flathunter/flathunter/hunter.py", line 27, in try_crawl return searcher.crawl(url, max_pages) File "/home/simon/Documents/flathunter/flathunter/abstract_crawler.py", line 150, in crawl return self.get_results(url, max_pages) File "/home/simon/Documents/flathunter/flathunter/crawler/immobilienscout.py", line 90, in get_results soup = self.get_page(search_url, self.get_driver(), page_no) File "/home/simon/Documents/flathunter/flathunter/crawler/immobilienscout.py", line 65, in get_driver self.driver = get_chrome_driver(driver_arguments) File "/home/simon/Documents/flathunter/flathunter/chrome_wrapper.py", line 47, in get_chrome_driver driver = uc.Chrome(version_main=chrome_version, options=chrome_options) # pylint: disable=no-member File "/home/simon/.local/share/virtualenvs/flathunter-QaHh8Mme/lib/python3.9/site-packages/undetected_chromedriver/__init__.py", line 441, in __init__ super(Chrome, self).__init__( File "/home/simon/.local/share/virtualenvs/flathunter-QaHh8Mme/lib/python3.9/site-packages/selenium/webdriver/chrome/webdriver.py", line 80, in __init__ super().__init__( File "/home/simon/.local/share/virtualenvs/flathunter-QaHh8Mme/lib/python3.9/site-packages/selenium/webdriver/chromium/webdriver.py", line 101, in __init__ self.service.start() File "/home/simon/.local/share/virtualenvs/flathunter-QaHh8Mme/lib/python3.9/site-packages/selenium/webdriver/common/service.py", line 90, in start self._start_process(self.path) File "/home/simon/.local/share/virtualenvs/flathunter-QaHh8Mme/lib/python3.9/site-packages/selenium/webdriver/common/service.py", line 203, in _start_process self.process = subprocess.Popen( File "/usr/lib/python3.9/subprocess.py", line 951, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/lib/python3.9/subprocess.py", line 1823, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) OSError: [Errno 8] Exec format error: '/home/simon/.local/share/undetected_chromedriver/undetected_chromedriver' [2023/04/09 13:42:30|__init__.py |INFO ]: ensuring close
I tried the steps described by @Ralfons-06 in #192, but it seems the code changed so I'm unsure how to proceed. Any ideas? Thanks!
The text was updated successfully, but these errors were encountered: