Skip to content
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

Uncaught app exception #7

Open
K1WIZ opened this issue Oct 8, 2024 · 2 comments
Open

Uncaught app exception #7

K1WIZ opened this issue Oct 8, 2024 · 2 comments

Comments

@K1WIZ
Copy link

K1WIZ commented Oct 8, 2024

(ai) john@john-desktop:~/AI-Web-Scraper$ streamlit run main.py

You can now view your Streamlit app in your browser.

Local URL: http://localhost:8501
Network URL: http://10.1.73.111:8501

Connecting to Scraping Browser...
2024-10-08 12:23:44.423 Uncaught app exception
Traceback (most recent call last):
File "/home/john/AI-Web-Scraper/ai/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 88, in exec_func_with_error_handling
result = func()
^^^^^^
File "/home/john/AI-Web-Scraper/ai/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 579, in code_to_exec
exec(code, module.dict)
File "/home/john/AI-Web-Scraper/main.py", line 20, in
dom_content = scrape_website(url)
^^^^^^^^^^^^^^^^^^^
File "/home/john/AI-Web-Scraper/scrape.py", line 14, in scrape_website
sbr_connection = ChromiumRemoteConnection(SBR_WEBDRIVER, "goog", "chrome")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/john/AI-Web-Scraper/ai/lib/python3.12/site-packages/selenium/webdriver/chromium/remote_connection.py", line 30, in init
super().init(remote_server_addr, keep_alive, ignore_proxy)
File "/home/john/AI-Web-Scraper/ai/lib/python3.12/site-packages/selenium/webdriver/remote/remote_connection.py", line 278, in init
self._proxy_url = self._get_proxy_url() if not ignore_proxy else None
^^^^^^^^^^^^^^^^^^^^^
File "/home/john/AI-Web-Scraper/ai/lib/python3.12/site-packages/selenium/webdriver/remote/remote_connection.py", line 219, in _get_proxy_url
if self._url.startswith("https://"):
^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'startswith'

@Naf-Second
Copy link

if self._url.startswith("https://"):

Error in this line, add a checker if 'url' is empty or not before using the method 'startswith'

@davew723
Copy link

davew723 commented Oct 19, 2024

Observed same thing on mac with this git project. Submitted url has https:// so I don't believe that is the issue submitter's problem. I predict they aren't setting the ENV SBR_WEBDRIVER

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants