Replies: 1 comment
-
|
I'm not sure that running webdrivers on aws machines are good idea The reason might be your VMs ram, how much you have? You might want to try this one instead: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
My code: I'm using python 3.10, with uc==3.50 and selenium 4.9.0
` import undetected_chromedriver as uc
from tempfile import mkdtemp
def lambda_handler(event, context):
options = uc.ChromeOptions()
options.binary_location = '/opt/headless-chromium'
options.add_argument('--headless')
options.add_argument('--no-sandbox')
options.add_argument("--disable-gpu")
options.add_argument("--window-size=1280x1696")
options.add_argument("--single-process")
options.add_argument("--disable-dev-shm-usage")
options.add_argument("--disable-dev-tools")
options.add_argument("--no-zygote")
options.add_argument(f"--user-data-dir={mkdtemp()}")
options.add_argument(f"--data-path={mkdtemp()}")
options.add_argument(f"--disk-cache-dir={mkdtemp()}")
options.add_argument("--remote-debugging-port=9222")
[ERROR] OSError: [Errno 38] Function not implemented
Traceback (most recent call last):
File "/var/lang/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/var/task/lambda_function.py", line 1, in
import undetected_chromedriver as uc
File "/opt/python/lib/python3.10/site-packages/undetected_chromedriver/init.py", line 43, in
from .patcher import IS_POSIX
File "/opt/python/lib/python3.10/site-packages/undetected_chromedriver/patcher.py", line 25, in
class Patcher(object):
File "/opt/python/lib/python3.10/site-packages/undetected_chromedriver/patcher.py", line 26, in Patcher
lock = Lock()
File "/var/lang/lib/python3.10/multiprocessing/context.py", line 68, in Lock
return Lock(ctx=self.get_context())
File "/var/lang/lib/python3.10/multiprocessing/synchronize.py", line 162, in init
SemLock.init(self, SEMAPHORE, 1, 1, ctx=ctx)
File "/var/lang/lib/python3.10/multiprocessing/synchronize.py", line 57, in init
sl = self._semlock = _multiprocessing.SemLock(INIT_REPORT Init Duration: 771.11 ms Phase: init Status: error Error Type: Runtime.ExitError
INIT_REPORT Init Duration: 3037.82 ms Phase: invoke Status: timeout
START RequestId: c5d233fa-ee2e-4f18-bd54-848dc10d5c67 Version: $LATEST
2024-03-14T04:06:48.332Z c5d233fa-ee2e-4f18-bd54-848dc10d5c67 Task timed out after 3.08 seconds
Beta Was this translation helpful? Give feedback.
All reactions