vladris / tinkerer

Python blogging engine
https://vladris.com/tinkerer
Other
305 stars 81 forks source link

build error html In Japanese Windows 8 environment #29

Closed takekazuomi closed 11 years ago

takekazuomi commented 11 years ago

In Japanese Windows 8 environment

Always following error is occurred.

$ tinker -v
Tinkerer version 1.2.1

$ tinker -s
Your new blog is almost ready!
You just need to edit a couple of lines in conf.py

$ tinker -p 'test page'
New post created as 'C:\Users\Takekazu\tmp\test1\2013\10\11\test_page.rst'

$ tinker -b
Making output directory...
Running Sphinx v1.1.3
loading pickled environment... not yet created
building [html]: targets for 2 source files that are out of date
updating environment: 2 added, 0 changed, 0 removed
reading sources... [ 50%] 2013/10/11/test_page

Sphinx error:
'utf8' codec can't decode byte 0x8c in position 2: invalid start byte

After remove setlocale in metadata.py. It's works.

$ git diff .\metadata.py
diff --git a/tinkerer/ext/metadata.py b/tinkerer/ext/metadata.py
index 9dc713b..fa3f49d 100644
--- a/tinkerer/ext/metadata.py
+++ b/tinkerer/ext/metadata.py
@@ -26,7 +26,7 @@ def initialize(app):
     app.builder.env.blog_metadata = dict()

     # make sure we use system locale for date formatting
-    locale.setlocale(locale.LC_TIME, '')
+#    locale.setlocale(locale.LC_TIME, '')
vladris commented 11 years ago

I've seen this issue before and I thought it got fixed. It is tricky to repro as it depends on OS locale. Let's follow issue #28 for now and it might provide a better solution for this (completely remove OS dependency). If that doesn't go through, I'll take a stab at fixing this (again).

vladris commented 11 years ago

Should be fixed with pull request #28