Closed palewire closed 7 years ago
What's the error you're getting?
Sent from my iPhone
On Mar 7, 2017, at 9:51 PM, Ben Welsh notifications@github.com wrote:
we will need to adjust our code to handle that change.
cc @eyeseast
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
File "manage.py", line 8, in <module>
execute_from_command_line(sys.argv)
File "/Users/ryanbmarx/ctbigbuilder/lib/python2.7/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
utility.execute()
File "/Users/ryanbmarx/ctbigbuilder/lib/python2.7/site-packages/django/core/management/__init__.py", line 359, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/ryanbmarx/ctbigbuilder/lib/python2.7/site-packages/django/core/management/base.py", line 294, in run_from_argv
self.execute(*args, **cmd_options)
File "/Users/ryanbmarx/ctbigbuilder/lib/python2.7/site-packages/django/core/management/base.py", line 345, in execute
output = self.handle(*args, **options)
File "/Users/ryanbmarx/ctbigbuilder/lib/python2.7/site-packages/bigbuild/management/commands/createpage.py", line 70, in handle
self.create_page_directory(page)
File "/Users/ryanbmarx/ctbigbuilder/repo/config/toolbox/management/commands/createpage.py", line 51, in create_page_directory
dark=self.dark,
File "/Users/ryanbmarx/ctbigbuilder/lib/python2.7/site-packages/bigbuild/models/pages.py", line 70, in create_directory
self.write_frontmatter()
File "/Users/ryanbmarx/ctbigbuilder/lib/python2.7/site-packages/bigbuild/models/pages.py", line 95, in write_frontmatter
frontmatter.dump(self, path or self.frontmatter_path)
File "/Users/ryanbmarx/ctbigbuilder/lib/python2.7/site-packages/frontmatter/__init__.py", line 153, in dump
content = dumps(post, handler, **kwargs).encode(encoding)
File "/Users/ryanbmarx/ctbigbuilder/lib/python2.7/site-packages/frontmatter/__init__.py", line 183, in dumps
handler = post.handler or YAMLHandler()
AttributeError: 'Page' object has no attribute 'handler'```
I'm guessing it's post.handler
.
Thought that might be the case. I can push a fix that'll make it smoother.
The other you can and probably should do is explicitly set a handler, whether it's YAMLHandler
or something else.
Okie dokie. No problem. I've been thinking of rewriting my frontmatter system inside a Django serializer so maybe this is the time. FWIW, the bug does signal you may have lost a chunk of backward compatibility with your upgrade. Might be worth flipping up the big digit on the next version number.
Yeah, was wondering about if it's time for a bigger version.
Here's a PR that fixes the issue: https://github.com/eyeseast/python-frontmatter/pull/34
Thank you.
New release pushed and published as v0.4.1
. This should actually preserve backwards compatibility, at least as far as what I outlined in the original readme. Let me know if you run into other issues.
we will need to adjust our code to handle that change.
cc @eyeseast