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

Unable to parse YAML file config on Windows. #1688

Closed
tobiasraabe opened this issue May 31, 2022 · 4 comments
Closed

Unable to parse YAML file config on Windows. #1688

tobiasraabe opened this issue May 31, 2022 · 4 comments
Labels
bug This issue/PR relates to a bug. high-priority windows This issue/PR related to windows systems only

Comments

@tobiasraabe
Copy link

Description:

When I am running the tests for my cookiecutter on Windows, the cookiecutter cannot be created because: InvalidConfiguration('Unable to parse YAML file C:\\Users\\...\\AppData\\Local\\Temp\\pytest-of-...\\pytest-713\\user_dir0\\config.'

The content of the file is

cookiecutters_dir: "C:\Users\user\AppData\Local\Temp\pytest-of-user\pytest-713\user_dir0\cookiecutters"
replay_dir: "C:\Users\user\AppData\Local\Temp\pytest-of-user\pytest-713\user_dir0\cookiecutter_replay"

I am not familiar enough with YAML, but single quotes seem to be required here for a valid YAML file. At least, that is what http://www.yamllint.com/ tells me.

The same tests work with cookiecutter v1.7.3. Surprisingly, the config file looks identical with double quotes around the paths. Did the YAML reader change?

What I've run:

Run pytest in linked cookiecutter.

@jensens jensens added bug This issue/PR relates to a bug. high-priority labels Jun 1, 2022
@insspb insspb added the windows This issue/PR related to windows systems only label Jun 7, 2022
@tlambert03
Copy link

@andriihomiak
Copy link

Seems like the issue is on the pytest-cookies side, since it is generating user config during tests. I've submitted a PR that should fix this.

@kurtmckee
Copy link
Member

kurtmckee commented Jun 12, 2023

@jensens @pydanny @ssbarnea Please close this issue.

It appears to be an issue in the test suite, caused by an older version of pytest-cookies, which has since been fixed.

@tobiasraabe
Copy link
Author

tobiasraabe commented Jun 13, 2023

Thanks for the reminder. The issue has been fixed in hackebrot/pytest-cookies#63 and released with pytest-cookies v0.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug. high-priority windows This issue/PR related to windows systems only
Projects
None yet
Development

No branches or pull requests

6 participants