You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 16, 2019. It is now read-only.
In a Python 3.2 virtual env, building the site fails when permalink uses UUID (e.g. blog.auto_permalink.path = ":blog_path/:uuid"). Traceback is:
Traceback (most recent call last):
File "/home/dm/myprojects/blogofile-env/bin/blogofile", line 9, in <module>
load_entry_point('Blogofile==0.8-DEV', 'console_scripts', 'blogofile')()
File "/home/dm/myprojects/blogofile-env/bf_src/blogofile/main.py", line 58, in main
args.func(args)
File "/home/dm/myprojects/blogofile-env/bf_src/blogofile/main.py", line 388, in do_build
writer.write_site()
File "/home/dm/myprojects/blogofile-env/bf_src/blogofile/writer.py", line 49, in write_site
self.__run_controllers()
File "/home/dm/myprojects/blogofile-env/bf_src/blogofile/writer.py", line 162, in __run_controllers
controller.run_all(namespaces)
File "/home/dm/myprojects/blogofile-env/bf_src/blogofile/controller.py", line 229, in run_all
c.mod.run()
File "/home/dm/myprojects/blogofile-env/bf_blog_src/blogofile_blog/site_src/_controllers/blog/__init__.py", line 62, in run
blog.posts = post.parse_posts(blog.post.source_dir)
File "/home/dm/myprojects/blogofile-env/bf_blog_src/blogofile_blog/site_src/_controllers/blog/post.py", line 405, in parse_posts
p = Post(src, filename=post_fn)
File "/home/dm/myprojects/blogofile-env/bf_blog_src/blogofile_blog/site_src/_controllers/blog/post.py", line 109, in __init__
self.__post_process()
File "/home/dm/myprojects/blogofile-env/bf_blog_src/blogofile_blog/site_src/_controllers/blog/post.py", line 199, in __post_process
blog_config.path, self.title, self.date, uuid, self.filename)
File "/home/dm/myprojects/blogofile-env/bf_blog_src/blogofile_blog/site_src/_controllers/blog/post.py", line 374, in create_permalink
permalink = re.sub(":uuid", uuid, permalink)
File "/home/dm/myprojects/blogofile-env/lib/python3.2/re.py", line 170, in sub
return _compile(pattern, flags).sub(repl, string, count)
TypeError: sequence item 1: expected str instance, bytes found
Proposed solution:
Function bf_blog_src/blogofile_blog/site_src/_controllers/blog/post.py::create_guid() currently returns the GUID as bytes which breaks the RegEx later on.
Maybe we simply can convert the GUID to string, assuming the bytes are ASCII:
In a Python 3.2 virtual env, building the site fails when permalink uses UUID (e.g. blog.auto_permalink.path = ":blog_path/:uuid"). Traceback is:
Proposed solution:
Function bf_blog_src/blogofile_blog/site_src/_controllers/blog/post.py::create_guid() currently returns the GUID as bytes which breaks the RegEx later on.
Maybe we simply can convert the GUID to string, assuming the bytes are ASCII:
The text was updated successfully, but these errors were encountered: