Description
When I try to start the ASF CMS python markdown processing daemon using the instructions here: http://www.apache.org/dev/cmsref.html , with Python 2.7.8 and Python Markdown 2.5.1, I get the following error:
-----
File "markdownd.py", line 42, in <module>
dummy = markdown.markdown(unicode("", "utf-8"), EXTENSIONS)
File "/usr/local/lib/python2.7/site-packages/markdown/__init__.py", line 464, in markdown
md = Markdown(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/markdown/__init__.py", line 154, in __init__
configs=kwargs.get('extension_configs', {}))
File "/usr/local/lib/python2.7/site-packages/markdown/__init__.py", line 180, in registerExtensions
ext = self.build_extension(ext, configs.get(ext, {}))
File "/usr/local/lib/python2.7/site-packages/markdown/__init__.py", line 265, in build_extension
return module.makeExtension(**configs)
File "/Users/sarowe/svn/lucene/cms/build/mdx_elementid.py", line 150, in makeExtension
return IdExtension(configs=configs)
File "/usr/local/lib/python2.7/site-packages/markdown/extensions/__init__.py", line 36, in __init__
self.setConfigs(kwargs.pop('configs', {}))
File "/usr/local/lib/python2.7/site-packages/markdown/extensions/__init__.py", line 75, in setConfigs
for key, value in items:
TypeError: 'NoneType' object is not iterable
-----
[~gsingers] created an issue about this with the Python-Markdown project on github: https://github.com/waylan/Python-Markdown/issues/357 , where the project owner says it's for the downstream project to fix.
Here's a patch with a fix that works for me (the same fix as used by the django-wiki project, noted at the bottom of above-linked issue #357) :
-----
Index: mdx_elementid.py
===================================================================
--- mdx_elementid.py (revision 926469)
+++ mdx_elementid.py (working copy)
@@ -146,7 +146,7 @@
md.treeprocessors.add("elid", idext, "_begin")
-def makeExtension(configs=None):
+def makeExtension(configs={}):
return IdExtension(configs=configs)
if __name__ == "__main__":
-----
-----
File "markdownd.py", line 42, in <module>
dummy = markdown.markdown(unicode("", "utf-8"), EXTENSIONS)
File "/usr/local/lib/python2.7/site-packages/markdown/__init__.py", line 464, in markdown
md = Markdown(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/markdown/__init__.py", line 154, in __init__
configs=kwargs.get('extension_configs', {}))
File "/usr/local/lib/python2.7/site-packages/markdown/__init__.py", line 180, in registerExtensions
ext = self.build_extension(ext, configs.get(ext, {}))
File "/usr/local/lib/python2.7/site-packages/markdown/__init__.py", line 265, in build_extension
return module.makeExtension(**configs)
File "/Users/sarowe/svn/lucene/cms/build/mdx_elementid.py", line 150, in makeExtension
return IdExtension(configs=configs)
File "/usr/local/lib/python2.7/site-packages/markdown/extensions/__init__.py", line 36, in __init__
self.setConfigs(kwargs.pop('configs', {}))
File "/usr/local/lib/python2.7/site-packages/markdown/extensions/__init__.py", line 75, in setConfigs
for key, value in items:
TypeError: 'NoneType' object is not iterable
-----
[~gsingers] created an issue about this with the Python-Markdown project on github: https://github.com/waylan/Python-Markdown/issues/357 , where the project owner says it's for the downstream project to fix.
Here's a patch with a fix that works for me (the same fix as used by the django-wiki project, noted at the bottom of above-linked issue #357) :
-----
Index: mdx_elementid.py
===================================================================
--- mdx_elementid.py (revision 926469)
+++ mdx_elementid.py (working copy)
@@ -146,7 +146,7 @@
md.treeprocessors.add("elid", idext, "_begin")
-def makeExtension(configs=None):
+def makeExtension(configs={}):
return IdExtension(configs=configs)
if __name__ == "__main__":
-----