Closed tsumetaihana closed 3 years ago
I just tested the whole system (on Mac/Linux systems) and I confirm it is working correctly.
It may be an issue related to the chromedriver.exe
file: you could try to download it again, or to pass it as .\chromedriver.exe
. I assume here that you already installed all required dependencies and, of course, that Google Chrome is installed.
Please let us know.
I tried to reinstalled the chromedriver.exe and still no luck. Below are my cookidump directory:
C:\Users\ahwel\cookidump>dir Volume in drive C is OS Volume Serial Number is DE0A-FE9D
Directory of C:\Users\ahwel\cookidump
22/08/2021 03:29 PM
C:\Users\ahwel\cookidump>
I also try to install the python requirements again and it shows that i had already did that before:
C:\Users\ahwel\cookidump>pip install -r requirements.txt Requirement already satisfied: beautifulsoup4 in c:\users\ahwel\cookidump\lib\site-packages (from -r requirements.txt (line 1)) (4.9.3) Requirement already satisfied: selenium in c:\users\ahwel\cookidump\lib\site-packages (from -r requirements.txt (line 2)) (3.141.0) Requirement already satisfied: soupsieve>1.2 in c:\users\ahwel\cookidump\lib\site-packages (from beautifulsoup4->-r requirements.txt (line 1)) (2.2.1) Requirement already satisfied: urllib3 in c:\users\ahwel\cookidump\lib\site-packages (from selenium->-r requirements.txt (line 2)) (1.26.6)
would like to check with you, is the below command format correct?
C:\Users\ahwel\cookidump>python cookidump.py [--separate-json] 'C:\Users\ahwel\cookidump\chromedriver.exe' 'C:\Users\ahwel\cookidump\recipe'
I got error like below: C:\Users\ahwel\cookidump>python cookidump.py [--separate-json] 'C:\Users\ahwel\cookidump\chromedriver.exe' 'C:\Users\ahwel\cookidump\recipe' usage: cookidump.py [-h] [-s] webdriverfile outputdir cookidump.py: error: unrecognized arguments: 'C:\Users\ahwel\cookidump\recipe'
If i removed the outputdir, i can proceed further but returned with the same error as posted on top: C:\Users\ahwel\cookidump>python cookidump.py [--separate-json] 'C:\Users\ahwel\cookidump\chromedriver.exe' [CD] Welcome to cookidump, starting things off... [CD] Complete the website domain: https://cookidoo.international Traceback (most recent call last): File "C:\Users\ahwel\cookidump\lib\site-packages\selenium\webdriver\common\service.py", line 72, in start self.process = subprocess.Popen(cmd, env=self.env, File "C:\Users\ahwel\cookidump\lib\subprocess.py", line 951, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\ahwel\cookidump\lib\subprocess.py", line 1420, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\ahwel\cookidump\cookidump.py", line 237, in
Just run it as:
python cookidump.py 'C:\Users\ahwel\cookidump\chromedriver.exe' 'C:\Users\ahwel\cookidump\recipe'
without the [--separate-json]
parameter.
Alternatively, run it as:
python cookidump.py '.\chromedriver.exe' '.\recipe'
C:\Users\ahwel\cookidump>python cookidump.py 'C:\Users\ahwel\cookidump\chromedriver.exe' 'C:\Users\ahwel\cookidump\recipe' [CD] Welcome to cookidump, starting things off... [CD] Complete the website domain: https://cookidoo.international Traceback (most recent call last): File "C:\Users\ahwel\cookidump\lib\site-packages\selenium\webdriver\common\service.py", line 72, in start self.process = subprocess.Popen(cmd, env=self.env, File "C:\Users\ahwel\cookidump\lib\subprocess.py", line 951, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\ahwel\cookidump\lib\subprocess.py", line 1420, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\ahwel\cookidump\cookidump.py", line 237, in
Still no luck.... wonder where is the problem
I suggest you to open a python prompt (on the same cookidoo
folder including chromedriver.exe
) and paste the following.
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
webdriverfile = '.\chromedriver.exe'
chrome_options = Options()
brw = webdriver.Chrome(executable_path=webdriverfile, options=chrome_options)
brw.get('https://www.cookidoo.international')
Please check if it works.
Hi auino,
Thanks for the script. I manage to open the chromedriver.exe using the method above. The google Chrome browser opened and i'm able to land on cookidoo/international.
there are some error while i executing the script, I'm not sure it's normal or not:
Python 3.9.6 (tags/v3.9.6:db3ff76, Jun 28 2021, 15:26:21) [MSC v.1929 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.
from selenium import webdriver from selenium.webdriver.chrome.options import Options webdriverfile = '.\chromedriver.exe' chrome_options = Options() brw = webdriver.Chrome(executable_path=webdriverfile, options=chrome_options)
DevTools listening on ws://127.0.0.1:7190/devtools/browser/35f15094-36cf-4fa0-82e6-e3a7c24ea14d
[19188:15536:0823/191456.158:ERROR:device_event_log_impl.cc(214)] [19:14:56.159] USB: usb_device_handle_win.cc:1048 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F) brw.get('https://www.cookidoo.international') [8912:15292:0823/191654.058:ERROR:gpu_init.cc(441)] Passthrough is not supported, GL is disabled
Next, how should I dump the recipe from the cookidoo website?
Thanks again for your help
I'm not familiar with Windows environments, but I believe that the issue is related to your error, which I'm not sure depends on cookidump
.
Let's keep the issue opened, at least for now. (edit: closed due to inactivity)
thanks auino. Appreciate your effort
I had the same error. On Windows fix is to run with command python cookidump.py "chromedriver.exe" "output_directory" --separate-json
Hi Auino, firstly, thanks for your hard work and support on this. I'm very new in github and might ask a beginner questions. Please bear with me.
I tried to follow the instruction and believe i did those steps correctly, however, i'm having error when i execute cookidump.py. Please see the error log below:
C:\Users\ahwel\cookidump>python cookidump.py 'C:\Users\ahwel\cookidump\chromedriver.exe' 'C:\Users\ahwel\cookidump\cookidump-master\Test' [CD] Welcome to cookidump, starting things off... [CD] Complete the website domain: https://cookidoo.international Traceback (most recent call last): File "C:\Users\ahwel\cookidump\lib\site-packages\selenium\webdriver\common\service.py", line 72, in start self.process = subprocess.Popen(cmd, env=self.env, File "C:\Users\ahwel\cookidump\lib\subprocess.py", line 951, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\ahwel\cookidump\lib\subprocess.py", line 1420, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\ahwel\cookidump\cookidump.py", line 237, in
run(args.webdriverfile, args.outputdir, args.separate_json)
File "C:\Users\ahwel\cookidump\cookidump.py", line 94, in run
brw = startBrowser(webdriverfile)
File "C:\Users\ahwel\cookidump\cookidump.py", line 31, in startBrowser
driver = webdriver.Chrome(executable_path=chrome_driver_path, options=chrome_options)
File "C:\Users\ahwel\cookidump\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 73, in init
self.service.start()
File "C:\Users\ahwel\cookidump\lib\site-packages\selenium\webdriver\common\service.py", line 81, in start
raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'chromedriver.exe'' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
Can you let me know whether my command is correct? Let me know if you have any clue from the error log above. The location of chromedriver.exe is C:\Users\ahwel\cookidump\
Thank you