You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@infra.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2015/07/02 01:34:05 UTC

[jira] [Commented] (INFRA-8578) The markdown processing daemon fails to start when using Python Markdown v2.5.1

    [ https://issues.apache.org/jira/browse/INFRA-8578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14611183#comment-14611183 ] 

Sebb commented on INFRA-8578:
-----------------------------

The reason I did not fix that is that elementid [1] processing was removed as it did nothing. 
It still does nothing, see the commented out lines: 109-113 and 135-136

However I did note the issue with makeExtension in lines 152-159

I don't understand why markdownd.py was updated to re-instate elementid - it does nothing, as noted in INFRA-9705.

[1] https://svn.apache.org/repos/infra/websites/cms/build/mdx_elementid.py

> The markdown processing daemon fails to start when using Python Markdown v2.5.1
> -------------------------------------------------------------------------------
>
>                 Key: INFRA-8578
>                 URL: https://issues.apache.org/jira/browse/INFRA-8578
>             Project: Infrastructure
>          Issue Type: Bug
>          Components: CMS
>            Reporter: Steve Rowe
>            Assignee: Gavin
>              Labels: #bugbash
>
> 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__":
> -----



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)