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

AWS Lambda "[Errno 30] Read-only file system: '/var/task/.wdm'", #651

Open
DEENUU1 opened this issue Jan 1, 2024 · 1 comment
Open

AWS Lambda "[Errno 30] Read-only file system: '/var/task/.wdm'", #651

DEENUU1 opened this issue Jan 1, 2024 · 1 comment

Comments

@DEENUU1
Copy link

DEENUU1 commented Jan 1, 2024

Is there a way to change installation path because i got this error on AWS Lambda (also without using os.environ['WDM_LOCAL'] = '1')

from abc import abstractmethod, ABC
from selenium.webdriver.chrome.service import Service as ChromeService
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.chrome.options import Options
import os

os.environ['WDM_LOCAL'] = '1'
SERVICE = ChromeService(ChromeDriverManager(driver_version="2.26").install())
{
  "errorMessage": "[Errno 30] Read-only file system: '/var/task/.wdm'",
  "errorType": "OSError",
  "requestId": "",
  "stackTrace": [
    "  File \"/var/lang/lib/python3.12/importlib/__init__.py\", line 90, in import_module\n    return _bootstrap._gcd_import(name[level:], package, level)\n",
    "  File \"<frozen importlib._bootstrap>\", line 1381, in _gcd_import\n",
    "  File \"<frozen importlib._bootstrap>\", line 1354, in _find_and_load\n",
    "  File \"<frozen importlib._bootstrap>\", line 1325, in _find_and_load_unlocked\n",
    "  File \"<frozen importlib._bootstrap>\", line 929, in _load_unlocked\n",
    "  File \"<frozen importlib._bootstrap_external>\", line 994, in exec_module\n",
    "  File \"<frozen importlib._bootstrap>\", line 488, in _call_with_frames_removed\n",
    "  File \"/var/task/main.py\", line 1, in <module>\n    from tasks import run_jjit\n",
    "  File \"/var/task/tasks.py\", line 5, in <module>\n    from scrapers.justjoinit.get_content import CATEGORIES\n",
    "  File \"/var/task/scrapers/justjoinit/get_content.py\", line 1, in <module>\n    from ..strategy_abstract.get_content import GetContentStrategy\n",
    "  File \"/var/task/scrapers/strategy_abstract/get_content.py\", line 8, in <module>\n    SERVICE = ChromeService(ChromeDriverManager(driver_version=\"2.26\").install())\n",
    "  File \"/var/task/webdriver_manager/chrome.py\", line 40, in install\n    driver_path = self._get_driver_binary_path(self.driver)\n",
    "  File \"/var/task/webdriver_manager/core/manager.py\", line 41, in _get_driver_binary_path\n    binary_path = self._cache_manager.save_file_to_cache(driver, file)\n",
    "  File \"/var/task/webdriver_manager/core/driver_cache.py\", line 53, in save_file_to_cache\n    archive = self.save_archive_file(file, path)\n",
    "  File \"/var/task/webdriver_manager/core/driver_cache.py\", line 46, in save_archive_file\n    return self._file_manager.save_archive_file(file, path)\n",
    "  File \"/var/task/webdriver_manager/core/file_manager.py\", line 45, in save_archive_file\n    os.makedirs(directory, exist_ok=True)\n",
    "  File \"<frozen os>\", line 215, in makedirs\n",
    "  File \"<frozen os>\", line 215, in makedirs\n",
    "  File \"<frozen os>\", line 215, in makedirs\n",
    "  [Previous line repeated 1 more time]\n",
    "  File \"<frozen os>\", line 225, in makedirs\n"
  ]
}
@DEENUU1 DEENUU1 changed the title AWS Lambda AWS Lambda "[Errno 30] Read-only file system: '/var/task/.wdm'", Jan 1, 2024
@NikhilTank35
Copy link

I am also getting same error

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

2 participants