Closed rlabrecque closed 9 years ago
Hi @rlabrecque - thanks for the report.
The code is written to be cross-platform, but I've never tested in Windows before. I think this is a subtle bug with the jinja templates. I'll debug on a Windows machine today or tomorrow.
Afterwards, I'd like to set up Linux and Windows CI so this won't be problem in the future. I've filed https://github.com/bamos/cv/issues/12 for this.
Hi @rlabrecque - can you pull the latest code and try again? I think I've fixed the problem, caused by how Jinja's FileSystemLoader handles paths in Windows.
Yep, It's all good now! Thanks!
\cc @emichael
Huh, I don't quite understand what the problem was, and I'm curious. Did he have a folder/file with a forward slash in the path?
@emichael - in windows, generate.py
will create a string like
sections\education.tex
(with backslashes from os.path.sep
)
to retrieve and render a template with self._jinja_env.get_template
.
I don't understand why, but Jinja's get_template
method expects
the path to be separated with forward slashes, even in Windows.
This seems to be a problem in other projects too: https://github.com/mrobb/complexity/commit/912ca3ac2fa97deb427d529a452c805903f686d2
Ugh. And I thought religious use of os.path.join
would prevent such nonsense...
I'm looking into this cv project for myself, but it doesn't seem to work out of the box, at least on windows.
I end up with this:
Any chance that I'm doing something wrong? All I did was clone, pip3 install -r requirements.txt, generate.py cv.yaml