Python Forum
Load a Folium map into a pdf-file
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Load a Folium map into a pdf-file
#1
Hello,
I am encountering an issue where I am unable to insert a map generated in Folium into a PDF file. This type of error pops out:





Error:
WebDriverException Traceback (most recent call last) <ipython-input-4-17d956ce3c91> in <cell line: 80>() 78 79 # Use ChromeDriverManager to get the correct ChromeDriver path and version ---> 80 driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options) 81 82 # Load the saved HTML file 5 frames /usr/local/lib/python3.10/dist-packages/selenium/webdriver/chrome/webdriver.py in __init__(self, options, service, keep_alive) 43 options = options if options else Options() 44 ---> 45 super().__init__( 46 browser_name=DesiredCapabilities.CHROME["browserName"], 47 vendor_prefix="goog", /usr/local/lib/python3.10/dist-packages/selenium/webdriver/chromium/webdriver.py in __init__(self, browser_name, vendor_prefix, options, service, keep_alive) 64 65 try: ---> 66 super().__init__(command_executor=executor, options=options) 67 except Exception: 68 self.quit() /usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py in __init__(self, command_executor, keep_alive, file_detector, options, locator_converter, web_element_cls, client_config) 239 self._authenticator_id = None 240 self.start_client() --> 241 self.start_session(capabilities) 242 self._fedcm = FedCM(self) 243 /usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py in start_session(self, capabilities) 327 328 caps = _create_caps(capabilities) --> 329 response = self.execute(Command.NEW_SESSION, caps)["value"] 330 self.session_id = response.get("sessionId") 331 self.caps = response.get("capabilities") /usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py in execute(self, driver_command, params) 382 response = self.command_executor.execute(driver_command, params) 383 if response: --> 384 self.error_handler.check_response(response) 385 response["value"] = self._unwrap_value(response.get("value", None)) 386 return response /usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/errorhandler.py in check_response(self, response) 230 alert_text = value["alert"].get("text") 231 raise exception_class(message, screen, stacktrace, alert_text) # type: ignore[call-arg] # mypy is not smart enough here --> 232 raise exception_class(message, screen, stacktrace) 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/chromium-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.) Stacktrace: #0 0x578483f2e4e3 <unknown> #1 0x578483c5dc76 <unknown> #2 0x578483c86d78 <unknown> #3 0x578483c83029 <unknown> #4 0x578483cc1ccc <unknown> #5 0x578483cc147f <unknown> #6 0x578483cb8de3 <unknown> #7 0x578483c8e2dd <unknown> #8 0x578483c8f34e <unknown> #9 0x578483eee3e4 <unknown> #10 0x578483ef23d7 <unknown> #11 0x578483efcb20 <unknown> #12 0x578483ef3023 <unknown> #13 0x578483ec11aa <unknown> #14 0x578483f176b8 <unknown> #15 0x578483f17847 <unknown> #16 0x578483f27243 <unknown> #17 0x7ed02e9d0ac3 <unknown>
I will provide the code if it is necessary.
If you identify any issues, please provide your suggestions below. Additionally, if you any further recommendations for enhancing the code, kindly share your comments.
Thank you in advance
John
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to load all pages of the pdf file to the program alicenguyen 9 5,269 Jul-04-2022, 03:14 AM
Last Post: alicenguyen
  Folium: Conflict with Font Awesome Kit jgomes_eu 0 1,857 Apr-23-2022, 03:18 PM
Last Post: jgomes_eu
  Folium import error kashif_flavio 2 5,502 Dec-07-2020, 08:58 AM
Last Post: bowlofred
  Phyton code to load a comma separated csv file in to a dict and then in to a dB mrsenorchuck 2 3,590 Nov-29-2019, 10:59 AM
Last Post: mrsenorchuck
  Showing only one country in Folium tantony 3 7,424 Nov-01-2019, 03:32 PM
Last Post: nilamo
  Load and format a CSV file fioranosnake 11 6,774 Oct-30-2019, 12:32 PM
Last Post: perfringo
  Folium map from another website tantony 8 5,226 Oct-15-2019, 07:33 PM
Last Post: Larz60+
  Load JSON file data into mongodb using pymongo klllmmm 1 13,388 Jun-28-2019, 12:47 AM
Last Post: klllmmm
  Fatal Python error: Py_Initialize: unable to load the file system codec ecg1g15 0 4,292 Feb-12-2019, 12:16 PM
Last Post: ecg1g15
  Cant seem to load my image file jamshaid1997 0 3,260 Jan-18-2019, 02:54 PM
Last Post: jamshaid1997

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020