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

Running cookiecutter command on windows does not work #48

Open
anirbanroywillow opened this issue Jan 23, 2024 · 2 comments
Open

Running cookiecutter command on windows does not work #48

anirbanroywillow opened this issue Jan 23, 2024 · 2 comments

Comments

@anirbanroywillow
Copy link

anirbanroywillow commented Jan 23, 2024

I tried installing this repo using cookiecutter on 2 different PC's. They keep failing with the same error.

PS C:\Users<USERNAME><DRIVE>\Desktop\1.Projects> python -m cookiecutter https://github.com/italomaia/flask-empty
[1/17] project_name (Your Project Name): test
[2/17] repo_name (test):
[3/17] version (0.1):
[4/17] use_sql_sqlite (yes): no
[5/17] use_sql_postgres (no):
[6/17] use_sql_mysql (no): yes
[7/17] use_sql_cockroachdb (no):
[8/17] use_nosql_mongodb (no):
[9/17] use_admin (no):
[10/17] use_security (yes):
[11/17] use_rest (yes):
[12/17] use_socketio (yes):
[13/17] use_async_tasks (yes):
[14/17] use_http_mixin (yes):
[15/17] serve_static_files (yes):
[16/17] create_index_view (yes):
[17/17] json_friendly (yes):
File "C:\Users<USER>\AppData\Local\Temp\tmpj8dljd6h.py", line 42
'_output_dir': 'C:\Users/<USERNAME><DRIVE>\Desktop\1.Projects',
^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
ERROR: Stopping generation because post_gen_project hook script didn't exit successfully
Hook script failed (exit status: 1)

Not sure what the issue is though.

@anirbanroywillow
Copy link
Author

anirbanroywillow commented Jan 23, 2024

Ran it in WSL. Works without an issue. Windows file system. particularly "\" symbol is not supported.

@pampersrocker
Copy link
Contributor

The path is treated as a literal string and tries to escape the \ paths from windows. A potential fix is to treat them as raw strings instead: lab132@97fcfae

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