Comments (7)
This is little hard for me to debug because I'm not able to test this on a Windows machine and this seems to be an issue specific to it.
Could you add the following after line 311 in core.py and paste the output here?
print(template)
from mynt.
Actually, I think I found the issue. It's two-fold, and I don't know if it's possible to fix.
The first minor bug is here:
https://github.com/Anomareh/mynt/blob/master/mynt/renderers/jinja.py#L84
You're hard-coding '/' - if I switch it over to use os.path.sep, I can compile templates in the root directory fine. However, there's actually a bug in Jinja2, I think. Specifically, here:
https://github.com/mitsuhiko/jinja2/blob/master/jinja2/loaders.py#L29
The '/' is hard-coded again. And this causes the function to die when it checks for the path separator in the template name. I fixed this by adding this small snippet:
if os.path.sep != '/':
name = name.replace(os.path.sep, '/')
At line 36 in jinja.py:
https://github.com/Anomareh/mynt/blob/master/mynt/renderers/jinja.py#L36
I'm going to open an issue over at Jinja2, too, to see if this is actually a bug.
from mynt.
Ah, nice catch! I'm gonna wait a bit to see if your Jinja issue gets a reply before I push a fix.
Thanks again for reporting / catching this.
from mynt.
See mitsuhiko's comment here.
from mynt.
Aye, I saw. Rewriting paths seems like an awful solution :/
Just to be clear, without lines 37-39 in your pull request it still errors out on you? Replacing the hardcoded slash on line 84/88 with os.path.sep
isn't sufficient?
from mynt.
Yeah, if I just replace that one line, I get this error:
.. pages
Loading: 404.html [u'C:\\Temp\\tmp\\MirroredWhite']
Loading: index.html [u'C:\\Temp\\tmp\\MirroredWhite']
Loading: about\index.html [u'C:\\Temp\\tmp\\MirroredWhite']
!! Template not found.
The extra lines are debugging messages name and loader.searchpath in the _PrefixLoader.get_source method.
from mynt.
This is now fixed and will be in 0.1.9 which should be available at some point today.
Thanks again for catching this and figuring out the cause!
from mynt.
Related Issues (20)
- unordered types HOT 2
- !! Template not found error with jinja 2.7 on windows HOT 5
- error building houdini.py on windows HOT 1
- Jinja TemplateSyntaxErrors are uninformative HOT 1
- Unexpected markdown rendering with lists HOT 3
- Awesome CSS/demo theme! ^5 HOT 1
- mynt is not installed successfully? HOT 1
- Limit posts in dev0.3 not working HOT 2
- UnicodeDecodeError with Python 3.3 HOT 1
- post_url scheme generates capital letter directorys HOT 1
- Feature proposal: Write pages in Markdown HOT 7
- Active Item in Navbar HOT 1
- MathJax markup in Markdown HOT 11
- Outdated Documentation for posts in tag object HOT 1
- No tag.url value in item.tags, post.html template HOT 1
- Pandoc as a parser? HOT 16
- Can't initialize the site HOT 3
- Question: Is there a way to add data via a json file etc
- New install, new init requires docutils HOT 1
- Add "always_include" configuration setting for extra folders and files that should be copied during generation HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mynt.