lorenzbr / GooglePatentsPdfDownloader

Download patents as PDF documents from Google Patents

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error about download google patents

korlin0110 opened this issue · comments

When I use this script after install google-chrome and chromedriver:

$ python -m GooglePatentsPdfDownloader EP0551921B1 --driver /usr/bin/chromedriver

I get the error message:

1 patent(s) remaining.
Traceback (most recent call last):
File "/home/user/anaconda3/envs/GooglePatents/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/home/user/anaconda3/envs/GooglePatents/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/user/anaconda3/envs/GooglePatents/lib/python3.6/site-packages/GooglePatentsPdfDownloader/main.py", line 37, in
pat_dl.download(**kwargs)
File "/home/user/anaconda3/envs/GooglePatents/lib/python3.6/site-packages/GooglePatentsPdfDownloader/patent_downloader.py", line 74, in download
remove_kind_codes=remove_kind_codes
File "/home/user/anaconda3/envs/GooglePatents/lib/python3.6/site-packages/GooglePatentsPdfDownloader/patent_downloader.py", line 137, in get_pdfs
remove_kind_codes=remove_kind_codes
File "/home/user/anaconda3/envs/GooglePatents/lib/python3.6/site-packages/GooglePatentsPdfDownloader/patent_downloader.py", line 95, in get_pdf
driver = webdriver.Chrome(executable_path=self.driver_file)
File "/home/user/anaconda3/envs/GooglePatents/lib/python3.6/site-packages/selenium/webdriver/chrome/webdriver.py", line 81, in init
desired_capabilities=desired_capabilities)
File "/home/user/anaconda3/envs/GooglePatents/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in init
self.start_session(capabilities, browser_profile)
File "/home/user/anaconda3/envs/GooglePatents/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/home/user/anaconda3/envs/GooglePatents/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/home/user/anaconda3/envs/GooglePatents/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally.
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

How to remove this error and download pdf from google patents?

It works for me when running on Windows. Have you checked that the chromedriver.exe is the correct one, i.e., it can used for your Chrome version? I tested this for Chrome version 99.

So, this tool only use in the wndows system? My system is ubuntu server, and chrome version is 99.0.4844.82

Yes, on Windows, it should work. I am not able to verify this on Ubuntu right now. I'll let you now once I have tried this.

Also not working on Linux for me.