-
Notifications
You must be signed in to change notification settings - Fork 694
Closed
Labels
bugSomething isn't working.Something isn't working.t-toolingIssues with this label are in the ownership of the tooling team.Issues with this label are in the ownership of the tooling team.
Milestone
Description
Error creating new project template.
I am using debian.
st@st-17:~/PROJECT/2025/crawlee-python_test$ pipx run crawlee create 1
⚠️ crawlee is already on your PATH and installed at /home/st/.local/bin/crawlee. Downloading and
running anyway.
[?] Please select the Crawler type:
Beautifulsoup
Parsel
> Playwright
Playwright-camoufox
[?] Please select the HTTP client:
> Httpx
Curl-impersonate
[?] Please select the package manager:
> Poetry
Pip
Manual
[?] Please specify the start URL: https://crawlee.dev
[?] Should Apify integration be set up for you? (y/N):
╭───────────────────────────────── Traceback (most recent call last) ──────────────────────────────────╮
│ /home/st/.local/pipx/.cache/9c73f449d632f87/lib/python3.11/site-packages/crawlee/_cli.py:196 in │
│ create │
│ │
│ 193 │ │ │ │ transient=True, │
│ 194 │ │ │ ) as progress: │
│ 195 │ │ │ │ progress.add_task(description='Bootstrapping...', total=None) │
│ ❱ 196 │ │ │ │ cookiecutter( │
│ 197 │ │ │ │ │ template=str(template_directory), │
│ 198 │ │ │ │ │ no_input=True, │
│ 199 │ │ │ │ │ extra_context={ │
│ │
│ ╭─────────────────────────────────── locals ───────────────────────────────────╮ │
│ │ crawler_type = 'playwright' │ │
│ │ enable_apify_integration = False │ │
│ │ http_client = 'httpx' │ │
│ │ package_manager = 'poetry' │ │
│ │ package_name = '1' │ │
│ │ progress = <rich.progress.Progress object at 0x7fadc5c3f950> │ │
│ │ project_name = '1' │ │
│ │ start_url = 'https://crawlee.dev' │ │
│ ╰──────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/st/.local/pipx/.cache/9c73f449d632f87/lib/python3.11/site-packages/cookiecutter/main.py:182 in │
│ cookiecutter │
│ │
│ 179 │ │
│ 180 │ # Create project from local context and project template. │
│ 181 │ with import_patch: │
│ ❱ 182 │ │ result = generate_files( │
│ 183 │ │ │ repo_dir=repo_dir, │
│ 184 │ │ │ context=context, │
│ 185 │ │ │ overwrite_if_exists=overwrite_if_exists, │
│ │
│ ╭───────────────────────────────────────────── locals ─────────────────────────────────────────────╮ │
│ │ accept_hooks = True │ │
│ │ base_repo_dir = '/home/st/.local/pipx/.cache/9c73f449d632f87/lib/python3.11/site-pack… │ │
│ │ checkout = None │ │
│ │ cleanup = False │ │
│ │ cleanup_base_repo_dir = False │ │
│ │ config_dict = { │ │
│ │ │ 'cookiecutters_dir': '/home/st/.cookiecutters/', │ │
│ │ │ 'replay_dir': '/home/st/.cookiecutter_replay/', │ │
│ │ │ 'default_context': OrderedDict(), │ │
│ │ │ 'abbreviations': { │ │
│ │ │ │ 'gh': 'https://github.com/{0}.git', │ │
│ │ │ │ 'gl': 'https://gitlab.com/{0}.git', │ │
│ │ │ │ 'bb': 'https://bitbucket.org/{0}' │ │
│ │ │ } │ │
│ │ } │ │
│ │ config_file = None │ │
│ │ context = OrderedDict([('cookiecutter', OrderedDict([('project_name', '1'), │ │
│ │ ('__package_name', '1'), ('crawler_type', 'playwright'), │ │
│ │ ('__crawler_type', 'playwright'), ('http_client', 'httpx'), │ │
│ │ ('package_manager', 'poetry'), ('enable_apify_integration', False), │ │
│ │ ('start_url', 'https://crawlee.dev'), ('_jinja2_env_vars', │ │
│ │ OrderedDict([('line_statement_prefix', '# %')])), ('_extensions', │ │
│ │ ['jinja2.ext.do']), ('_template', │ │
│ │ '/home/st/.local/pipx/.cache/9c73f449d632f87/lib/python3.11/site-pack… │ │
│ │ ('_output_dir', '/home/st/PROJECT/2025/crawlee-python_test'), │ │
│ │ ('_repo_dir', │ │
│ │ '/home/st/.local/pipx/.cache/9c73f449d632f87/lib/python3.11/site-pack… │ │
│ │ ('_checkout', None)])), ('_cookiecutter', {'project_name': '1', │ │
│ │ 'crawler_type': ['playwright', 'beautifulsoup', 'parsel', │ │
│ │ 'playwright-camoufox'], 'http_client': ['httpx', 'curl-impersonate'], │ │
│ │ 'package_manager': ['poetry', 'pip', 'manual'], │ │
│ │ 'enable_apify_integration': False, 'start_url': │ │
│ │ 'https://crawlee.dev'})]) │ │
│ │ context_file = '/home/st/.local/pipx/.cache/9c73f449d632f87/lib/python3.11/site-pack… │ │
│ │ context_for_prompting = OrderedDict([('cookiecutter', OrderedDict([('project_name', '1'), │ │
│ │ ('__package_name', '1'), ('crawler_type', 'playwright'), │ │
│ │ ('__crawler_type', 'playwright'), ('http_client', 'httpx'), │ │
│ │ ('package_manager', 'poetry'), ('enable_apify_integration', False), │ │
│ │ ('start_url', 'https://crawlee.dev'), ('_jinja2_env_vars', │ │
│ │ OrderedDict([('line_statement_prefix', '# %')])), ('_extensions', │ │
│ │ ['jinja2.ext.do']), ('_template', │ │
│ │ '/home/st/.local/pipx/.cache/9c73f449d632f87/lib/python3.11/site-pack… │ │
│ │ ('_output_dir', '/home/st/PROJECT/2025/crawlee-python_test'), │ │
│ │ ('_repo_dir', │ │
│ │ '/home/st/.local/pipx/.cache/9c73f449d632f87/lib/python3.11/site-pack… │ │
│ │ ('_checkout', None)])), ('_cookiecutter', {'project_name': '1', │ │
│ │ 'crawler_type': ['playwright', 'beautifulsoup', 'parsel', │ │
│ │ 'playwright-camoufox'], 'http_client': ['httpx', 'curl-impersonate'], │ │
│ │ 'package_manager': ['poetry', 'pip', 'manual'], │ │
│ │ 'enable_apify_integration': False, 'start_url': │ │
│ │ 'https://crawlee.dev'})]) │ │
│ │ default_config = False │ │
│ │ directory = None │ │
│ │ extra_context = { │ │
│ │ │ 'project_name': '1', │ │
│ │ │ 'package_manager': 'poetry', │ │
│ │ │ 'crawler_type': 'playwright', │ │
│ │ │ 'http_client': 'httpx', │ │
│ │ │ 'enable_apify_integration': False, │ │
│ │ │ 'start_url': 'https://crawlee.dev' │ │
│ │ } │ │
│ │ import_patch = <cookiecutter.main._patch_import_path_for_repo object at │ │
│ │ 0x7fadc5c3d910> │ │
│ │ keep_project_on_failure = False │ │
│ │ no_input = True │ │
│ │ output_dir = '.' │ │
│ │ overwrite_if_exists = False │ │
│ │ password = None │ │
│ │ replay = None │ │
│ │ repo_dir = '/home/st/.local/pipx/.cache/9c73f449d632f87/lib/python3.11/site-pack… │ │
│ │ skip_if_file_exists = False │ │
│ │ template = '/home/st/.local/pipx/.cache/9c73f449d632f87/lib/python3.11/site-pack… │ │
│ │ template_name = 'project_template' │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/st/.local/pipx/.cache/9c73f449d632f87/lib/python3.11/site-packages/cookiecutter/generate.py:40 │
│ 9 in generate_files │
│ │
│ 406 │ │ │ │ │ shutil.copymode(infile, outfile) │
│ 407 │ │ │ │ │ continue │
│ 408 │ │ │ │ try: │
│ ❱ 409 │ │ │ │ │ generate_file( │
│ 410 │ │ │ │ │ │ project_dir, infile, context, env, skip_if_file_exists │
│ 411 │ │ │ │ │ ) │
│ 412 │ │ │ │ except UndefinedError as err: │
│ │
│ ╭───────────────────────────────────────────── locals ─────────────────────────────────────────────╮ │
│ │ accept_hooks = True │ │
│ │ context = OrderedDict([('cookiecutter', OrderedDict([('project_name', '1'), │ │
│ │ ('__package_name', '1'), ('crawler_type', 'playwright'), │ │
│ │ ('__crawler_type', 'playwright'), ('http_client', 'httpx'), │ │
│ │ ('package_manager', 'poetry'), ('enable_apify_integration', False), │ │
│ │ ('start_url', 'https://crawlee.dev'), ('_jinja2_env_vars', │ │
│ │ OrderedDict([('line_statement_prefix', '# %')])), ('_extensions', │ │
│ │ ['jinja2.ext.do']), ('_template', │ │
│ │ '/home/st/.local/pipx/.cache/9c73f449d632f87/lib/python3.11/site-pa… │ │
│ │ ('_output_dir', '/home/st/PROJECT/2025/crawlee-python_test'), │ │
│ │ ('_repo_dir', │ │
│ │ '/home/st/.local/pipx/.cache/9c73f449d632f87/lib/python3.11/site-pa… │ │
│ │ ('_checkout', None)])), ('_cookiecutter', {'project_name': '1', │ │
│ │ 'crawler_type': ['playwright', 'beautifulsoup', 'parsel', │ │
│ │ 'playwright-camoufox'], 'http_client': ['httpx', │ │
│ │ 'curl-impersonate'], 'package_manager': ['poetry', 'pip', 'manual'], │ │
│ │ 'enable_apify_integration': False, 'start_url': │ │
│ │ 'https://crawlee.dev'})]) │ │
│ │ copy_dirs = [] │ │
│ │ d = '__pycache__' │ │
│ │ d_ = '{{cookiecutter.__package_name}}/__pycache__' │ │
│ │ delete_project_on_failure = True │ │
│ │ dirs = ['__pycache__'] │ │
│ │ env = <cookiecutter.environment.StrictEnvironment object at │ │
│ │ 0x7fadc82d44d0> │ │
│ │ f = 'routes.py' │ │
│ │ files = ['main.py', '__main__.py', 'routes.py', '__init__.py'] │ │
│ │ infile = '{{cookiecutter.__package_name}}/routes.py' │ │
│ │ keep_project_on_failure = False │ │
│ │ output_dir = '.' │ │
│ │ output_directory_created = True │ │
│ │ overwrite_if_exists = False │ │
│ │ project_dir = '/home/st/PROJECT/2025/crawlee-python_test/1' │ │
│ │ render_dirs = ['__pycache__'] │ │
│ │ repo_dir = '/home/st/.local/pipx/.cache/9c73f449d632f87/lib/python3.11/site-pa… │ │
│ │ root = './{{cookiecutter.__package_name}}' │ │
│ │ skip_if_file_exists = False │ │
│ │ template_dir = PosixPath('/home/st/.local/pipx/.cache/9c73f449d632f87/lib/python3.… │ │
│ │ unrendered_dir = '/home/st/PROJECT/2025/crawlee-python_test/1/./{{cookiecutter.__pac… │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/st/.local/pipx/.cache/9c73f449d632f87/lib/python3.11/site-packages/cookiecutter/generate.py:20 │
│ 9 in generate_file │
│ │
│ 206 │ │ # information about syntax error location │
│ 207 │ │ exception.translated = False │
│ 208 │ │ raise │
│ ❱ 209 │ rendered_file = tmpl.render(**context) │
│ 210 │ │
│ 211 │ if context['cookiecutter'].get('_new_lines', False): │
│ 212 │ │ # Use `_new_lines` from context, if configured. │
│ │
│ ╭───────────────────────────────────────────── locals ─────────────────────────────────────────────╮ │
│ │ context = OrderedDict([('cookiecutter', OrderedDict([('project_name', '1'), │ │
│ │ ('__package_name', '1'), ('crawler_type', 'playwright'), │ │
│ │ ('__crawler_type', 'playwright'), ('http_client', 'httpx'), │ │
│ │ ('package_manager', 'poetry'), ('enable_apify_integration', False), │ │
│ │ ('start_url', 'https://crawlee.dev'), ('_jinja2_env_vars', │ │
│ │ OrderedDict([('line_statement_prefix', '# %')])), ('_extensions', │ │
│ │ ['jinja2.ext.do']), ('_template', │ │
│ │ '/home/st/.local/pipx/.cache/9c73f449d632f87/lib/python3.11/site-packages… │ │
│ │ ('_output_dir', '/home/st/PROJECT/2025/crawlee-python_test'), │ │
│ │ ('_repo_dir', │ │
│ │ '/home/st/.local/pipx/.cache/9c73f449d632f87/lib/python3.11/site-packages… │ │
│ │ ('_checkout', None)])), ('_cookiecutter', {'project_name': '1', │ │
│ │ 'crawler_type': ['playwright', 'beautifulsoup', 'parsel', │ │
│ │ 'playwright-camoufox'], 'http_client': ['httpx', 'curl-impersonate'], │ │
│ │ 'package_manager': ['poetry', 'pip', 'manual'], │ │
│ │ 'enable_apify_integration': False, 'start_url': 'https://crawlee.dev'})]) │ │
│ │ env = <cookiecutter.environment.StrictEnvironment object at 0x7fadc82d44d0> │ │
│ │ file_name_is_empty = False │ │
│ │ infile = '{{cookiecutter.__package_name}}/routes.py' │ │
│ │ infile_fwd_slashes = '{{cookiecutter.__package_name}}/routes.py' │ │
│ │ outfile = '/home/st/PROJECT/2025/crawlee-python_test/1/1/routes.py' │ │
│ │ outfile_tmpl = <Template memory:7fadc4f20a50> │ │
│ │ project_dir = '/home/st/PROJECT/2025/crawlee-python_test/1' │ │
│ │ skip_if_file_exists = False │ │
│ │ tmpl = <Template '{{cookiecutter.__package_name}}/routes.py'> │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/st/.local/pipx/.cache/9c73f449d632f87/lib/python3.11/site-packages/jinja2/environment.py:1295 │
│ in render │
│ │
│ 1292 │ │ try: │
│ 1293 │ │ │ return self.environment.concat(self.root_render_func(ctx)) # type: ignore │
│ 1294 │ │ except Exception: │
│ ❱ 1295 │ │ │ self.environment.handle_exception() │
│ 1296 │ │
│ 1297 │ async def render_async(self, *args: t.Any, **kwargs: t.Any) -> str: │
│ 1298 │ │ """This works similar to :meth:`render` but returns a coroutine │
│ │
│ ╭───────────────────────────────────────────── locals ─────────────────────────────────────────────╮ │
│ │ args = () │ │
│ │ ctx = <Context {'range': <class 'range'>, 'dict': <class 'dict'>, 'lipsum': <function │ │
│ │ generate_lorem_ipsum at 0x7fadc604fe20>, 'cycler': <class 'jinja2.utils.Cycler'>, │ │
│ │ 'joiner': <class 'jinja2.utils.Joiner'>, 'namespace': <class 'jinja2.utils.Namespace'>, │ │
│ │ 'random_ascii_string': <function │ │
│ │ RandomStringExtension.__init__.<locals>.random_ascii_string at 0x7fadc515e200>, │ │
│ │ 'uuid4': <function UUIDExtension.__init__.<locals>.uuid4 at 0x7fadc515e2a0>, │ │
│ │ 'cookiecutter': OrderedDict([('project_name', '1'), ('__package_name', '1'), │ │
│ │ ('crawler_type', 'playwright'), ('__crawler_type', 'playwright'), ('http_client', │ │
│ │ 'httpx'), ('package_manager', 'poetry'), ('enable_apify_integration', False), │ │
│ │ ('start_url', 'https://crawlee.dev'), ('_jinja2_env_vars', │ │
│ │ OrderedDict([('line_statement_prefix', '# %')])), ('_extensions', ['jinja2.ext.do']), │ │
│ │ ('_template', │ │
│ │ '/home/st/.local/pipx/.cache/9c73f449d632f87/lib/python3.11/site-packages/crawlee/proj… │ │
│ │ ('_output_dir', '/home/st/PROJECT/2025/crawlee-python_test'), ('_repo_dir', │ │
│ │ '/home/st/.local/pipx/.cache/9c73f449d632f87/lib/python3.11/site-packages/crawlee/proj… │ │
│ │ ('_checkout', None)]), '_cookiecutter': {'project_name': '1', 'crawler_type': │ │
│ │ ['playwright', 'beautifulsoup', 'parsel', 'playwright-camoufox'], 'http_client': │ │
│ │ ['httpx', 'curl-impersonate'], 'package_manager': ['poetry', 'pip', 'manual'], │ │
│ │ 'enable_apify_integration': False, 'start_url': 'https://crawlee.dev'}} of │ │
│ │ '{{cookiecutter.__package_name}}/routes.py'> │ │
│ │ kwargs = { │ │
│ │ │ 'cookiecutter': OrderedDict([('project_name', '1'), ('__package_name', '1'), │ │
│ │ ('crawler_type', 'playwright'), ('__crawler_type', 'playwright'), ('http_client', │ │
│ │ 'httpx'), ('package_manager', 'poetry'), ('enable_apify_integration', False), │ │
│ │ ('start_url', 'https://crawlee.dev'), ('_jinja2_env_vars', │ │
│ │ OrderedDict([('line_statement_prefix', '# %')])), ('_extensions', ['jinja2.ext.do']), │ │
│ │ ('_template', │ │
│ │ '/home/st/.local/pipx/.cache/9c73f449d632f87/lib/python3.11/site-packages/crawlee/proj… │ │
│ │ ('_output_dir', '/home/st/PROJECT/2025/crawlee-python_test'), ('_repo_dir', │ │
│ │ '/home/st/.local/pipx/.cache/9c73f449d632f87/lib/python3.11/site-packages/crawlee/proj… │ │
│ │ ('_checkout', None)]), │ │
│ │ │ '_cookiecutter': { │ │
│ │ │ │ 'project_name': '1', │ │
│ │ │ │ 'crawler_type': [ │ │
│ │ │ │ │ 'playwright', │ │
│ │ │ │ │ 'beautifulsoup', │ │
│ │ │ │ │ 'parsel', │ │
│ │ │ │ │ 'playwright-camoufox' │ │
│ │ │ │ ], │ │
│ │ │ │ 'http_client': ['httpx', 'curl-impersonate'], │ │
│ │ │ │ 'package_manager': ['poetry', 'pip', 'manual'], │ │
│ │ │ │ 'enable_apify_integration': False, │ │
│ │ │ │ 'start_url': 'https://crawlee.dev' │ │
│ │ │ } │ │
│ │ } │ │
│ │ self = <Template '{{cookiecutter.__package_name}}/routes.py'> │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/st/.local/pipx/.cache/9c73f449d632f87/lib/python3.11/site-packages/jinja2/environment.py:942 │
│ in handle_exception │
│ │
│ 939 │ │ """ │
│ 940 │ │ from .debug import rewrite_traceback_stack │
│ 941 │ │ │
│ ❱ 942 │ │ raise rewrite_traceback_stack(source=source) │
│ 943 │ │
│ 944 │ def join_path(self, template: str, parent: str) -> str: │
│ 945 │ │ """Join a template with the parent. By default all the lookups are │
│ │
│ ╭──────────────────────────────────── locals ────────────────────────────────────╮ │
│ │ self = <cookiecutter.environment.StrictEnvironment object at 0x7fadc82d44d0> │ │
│ │ source = None │ │
│ ╰────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ in top-level template code:1 │
│ │
│ /home/st/.local/pipx/.cache/9c73f449d632f87/lib/python3.11/site-packages/jinja2/loaders.py:209 in │
│ get_source │
│ │
│ 206 │ │ else: │
│ 207 │ │ │ plural = "path" if len(self.searchpath) == 1 else "paths" │
│ 208 │ │ │ paths_str = ", ".join(repr(p) for p in self.searchpath) │
│ ❱ 209 │ │ │ raise TemplateNotFound( │
│ 210 │ │ │ │ template, │
│ 211 │ │ │ │ f"{template!r} not found in search {plural}: {paths_str}", │
│ 212 │ │ │ ) │
│ │
│ ╭────────────────────────────────────── locals ───────────────────────────────────────╮ │
│ │ environment = <cookiecutter.environment.StrictEnvironment object at 0x7fadc82d44d0> │ │
│ │ filename = '../templates/routes_playwright.py' │ │
│ │ paths_str = "'.', '../templates'" │ │
│ │ pieces = ['routes_playwright.py'] │ │
│ │ plural = 'paths' │ │
│ │ searchpath = '../templates' │ │
│ │ self = <jinja2.loaders.FileSystemLoader object at 0x7fadc5c323d0> │ │
│ │ template = 'routes_playwright.py' │ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────╯
TemplateNotFound: 'routes_playwright.py' not found in search paths: '.', '../templates'
st@st-17:~/PROJECT/2025/crawlee-python_test$
Reactions are currently unavailable
Metadata
Metadata
Labels
bugSomething isn't working.Something isn't working.t-toolingIssues with this label are in the ownership of the tooling team.Issues with this label are in the ownership of the tooling team.