Skip to content

AttributeError: 'NoneType' object has no attribute 'startswith' #12

@RaviKumarSingh-Mckinsey

Description

@RaviKumarSingh-Mckinsey

@techwithtim techwithtim , Like others , Iam also facing same issue , Can you please check it out and suggest next step.

Ravi_Kumar_Singh@M-D7TVQ07C1W AI-Web-Scraper % streamlit run main.py

  You can now view your Streamlit app in your browser.

  Local URL: http://localhost:8502
  Network URL: http://10.18.4.78:8502

Connecting to Scraping Browser...
2024-12-07 12:45:33.355 Uncaught app exception
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 88, in exec_func_with_error_handling
    result = func()
             ^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 590, in code_to_exec
    exec(code, module.__dict__)
  File "/Users/Ravi_Kumar_Singh/Downloads/AI-Web-Scraper/main.py", line 20, in <module>
    dom_content = scrape_website(url)
                  ^^^^^^^^^^^^^^^^^^^
  File "/Users/Ravi_Kumar_Singh/Downloads/AI-Web-Scraper/scrape.py", line 14, in scrape_website
    sbr_connection = ChromiumRemoteConnection(SBR_WEBDRIVER, "goog", "chrome")
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/selenium/webdriver/chromium/remote_connection.py", line 36, in __init__
    super().__init__(
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/selenium/webdriver/remote/remote_connection.py", line 365, in __init__
    self._proxy_url = self._client_config.get_proxy_url()
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/selenium/webdriver/remote/client_config.py", line 274, in get_proxy_url
    "https_proxy" if self.remote_server_addr.startswith("https://") else "http_proxy",
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'startswith'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions