Template/Docker Build Failing After Recent Fix
Related Issue
This is a follow-up to issue #972 which addressed similar template creation issues.
Description
While the previous fixes have been implemented, the BeautifulSoup template is still experiencing build failures during the deployment process. The error appears to be related to Playwright dependency management during the Docker build process.
Current Version
- crawlee-0.5.5
Steps to Reproduce
- Run
crawlee create my_crawler cd my_crawler- Run
apify init - Run
apify push
Error Output
2025-02-11T16:05:56.771Z /bin/bash: line 1: playwright: command not found ERROR: Invalid requirement: 'Installing dependencies: cat requirements.txt sed s/^playwright==.*/playwright==/': Expected end or semicolon (after name and no valid version specifier) Installing dependencies: cat requirements.txt sed s/^playwright==.*/playwright==/ ^ (from line 1 of /dev/stdin) Hint: It looks like a path. File 'Installing dependencies: cat requirements.txt sed s/^playwright==.*/playwright==/' does not exist. ---> Removed intermediate container 8fbe002991e1 ACTOR: ERROR: Docker image build failed: The command '/bin/bash -o pipefail -c echo "Python version:" && python --version && echo "Installing dependencies:" cat requirements.txt sed "s/^playwright==.*/playwright==$(playwright --version | cut -d ' ' -f 2)/" | pip install -r /dev/stdin --no-dependencies && echo "All installed Python packages:" && pip freeze' returned a non-zero code: 1
Expected Behavior
The BeautifulSoup template should build and deploy successfully following the standard documentation steps.
Actual Behavior
The build process fails during dependency installation, specifically when trying to handle Playwright-related dependencies. This occurs even though BeautifulSoup template was selected (not Playwright).
Additional Notes
- This issue persists after the fixes implemented in fix: Fix playwright template and dockerfile #972
- The error suggests there might be an issue with the below (although it should work regardless of the template selected?):
- Playwright dependencies being included in BeautifulSoup template
- The dependency installation script's handling of requirements.txt
- The Docker build process attempting to use Playwright commands regardless of template choice
- when the apify init command is run there is a Warning message: "Warning: The current directory does not look like a Node.js or Python project." is this the expected output?
Questions for Maintainers
- Is there a configuration step missing from the documentation?