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

OSError: [WinError 998] Invalid access to memory location #177

Open
Roman-Kasianenko opened this issue Aug 15, 2024 · 0 comments
Open

OSError: [WinError 998] Invalid access to memory location #177

Roman-Kasianenko opened this issue Aug 15, 2024 · 0 comments

Comments

@Roman-Kasianenko
Copy link

Getting error:

OSError: [WinError 998] Invalid access to memory location

when trying to execute the following code:

from botasaurus.browser import browser, Driver


@browser
def scrape_heading_task(driver: Driver, data):
    driver.get("https://www.sconto.cz/")
    driver.sleep(3)
    heading = driver.get_text("h1")
    return {
        "heading": heading
    }


if __name__ == '__main__':
    scrape_heading_task()

here is the full trace:

Running
Exception in thread Thread-2 (check_and_delete_dead_profiles):
Traceback (most recent call last):
  File "C:\Program Files\Python310\lib\threading.py", line 1009, in _bootstrap_inner
    self.run()
  File "C:\Program Files\Python310\lib\threading.py", line 946, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Program Files\Python310\lib\site-packages\botasaurus_driver\core\profiles.py", line 72, in check_and_delete_dead_profiles
    running_ports = is_chrome_running_on_ports(ports)
  File "C:\Program Files\Python310\lib\site-packages\botasaurus_driver\core\profiles.py", line 36, in is_chrome_running_on_ports
    for proc in psutil.process_iter(['name', 'cmdline']):
  File "C:\Program Files\Python310\lib\site-packages\psutil\__init__.py", line 1459, in process_iter
    yield add(pid)
  File "C:\Program Files\Python310\lib\site-packages\psutil\__init__.py", line 1436, in add
    proc.info = proc.as_dict(attrs=attrs, ad_value=ad_value)
  File "C:\Program Files\Python310\lib\site-packages\psutil\__init__.py", line 542, in as_dict
    ret = meth()
  File "C:\Program Files\Python310\lib\site-packages\psutil\__init__.py", line 694, in cmdline
    return self._proc.cmdline()
  File "C:\Program Files\Python310\lib\site-packages\psutil\_pswindows.py", line 681, in wrapper
    raise convert_oserror(err, pid=self.pid, name=self._name)
  File "C:\Program Files\Python310\lib\site-packages\psutil\_pswindows.py", line 671, in convert_oserror
    raise exc
  File "C:\Program Files\Python310\lib\site-packages\psutil\_pswindows.py", line 679, in wrapper
    return fun(self, *args, **kwargs)
  File "C:\Program Files\Python310\lib\site-packages\psutil\_pswindows.py", line 695, in wrapper
    return fun(self, *args, **kwargs)
  File "C:\Program Files\Python310\lib\site-packages\psutil\_pswindows.py", line 780, in cmdline
    ret = cext.proc_cmdline(self.pid, use_peb=True)
OSError: [WinError 998] Invalid access to memory location

botasaurus versions:

botasaurus==4.0.54
botasaurus-api==4.0.4
botasaurus-driver==4.0.50
botasaurus-proxy-authentication==1.0.16
botasaurus-requests==4.0.28
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

1 participant