I'm trying to deploy timer trigger function that extracts data from web. I'm using playwright to access. My code runs as expected on my local machine. However when I tried to deploy on cloud it says:
Result: Failure Exception: Exception: ================================================================================ "chromium" browser was not found. Please complete Playwright installation via running "python -m playwright install" ================================================================================ Stack: File "/azure-functions-host/workers/python/3.8/LINUX/X64/azure_functions_worker/dispatcher.py", line 353, in _handle__invocation_request call_result = await fi.func(**args) File "/home/site/wwwroot/AsyncFlight/__init__.py", line 21, in main browser = await p.chromium.launch() File "/home/site/wwwroot/.python_packages/lib/site-packages/playwright/async_api/_generated.py", line 9943, in launch raise e File "/home/site/wwwroot/.python_packages/lib/site-packages/playwright/async_api/_generated.py", line 9921, in launch await self._impl_obj.launch( File "/home/site/wwwroot/.python_packages/lib/site-packages/playwright/_impl/_browser_type.py", line 73, in launch raise not_installed_error(f'"{self.name}" browser was not found.')
I have checked my consumption plan and my os on cloud is Linux and"azureFunctions.scmDoBuildDuringDeployment"
is set to true.
I have included playwright in my requirements.txt. Don't know what I'm missing. Please help!!
Thankyou
question from:
https://stackoverflow.com/questions/65929770/how-to-run-python-playwright-on-azure-cloud-using-python 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…