Opened on 04/27/2016 at 11:21:14 AM
Closed on 04/27/2016 at 03:41:02 PM
#3996 closed defect (fixed)
Error thrown in cms when generating static pages
Reported by: | greiner | Assignee: | trev |
---|---|---|---|
Priority: | P2 | Milestone: | |
Module: | Infrastructure | Keywords: | |
Cc: | trev, matze | Blocked By: | |
Blocking: | #3987 | Platform: | Unknown / Cross platform |
Ready: | yes | Confidential: | no |
Tester: | Unknown | Verified working: | no |
Review URL(s): |
Description (last modified by trev)
Environment
Ubuntu 14.04
Python 2.7.6
cms 407299178497
How to reproduce
- Try to generate static pages for revision 52f7df39b043 of web.eyeo.com
Observed behaviour
According to this comment the following error is thrown:
Traceback (most recent call last): File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/opt/cms/cms/bin/generate_static_pages.py", line 154, in <module> generate_pages(repo, output_dir) File "/opt/cms/cms/bin/generate_static_pages.py", line 118, in generate_pages pagedata = process_page(source, locale, page) File "/opt/cms/cms/utils.py", line 91, in process_page site_url_override, localized_string_callback), File "/opt/cms/cms/utils.py", line 76, in get_page_params params["head"], params["body"] = converter() File "/opt/cms/cms/converters.py", line 283, in __call__ result = self.resolve_includes(result) File "/opt/cms/cms/converters.py", line 278, in resolve_includes text File "/usr/lib/python2.7/re.py", line 151, in sub return _compile(pattern, flags).sub(repl, string, count) File "/opt/cms/cms/converters.py", line 266, in resolve_include result = converter() File "/opt/cms/cms/converters.py", line 282, in __call__ result = self.get_html(*self._params[self._key]) File "/opt/cms/cms/converters.py", line 334, in get_html result = md.convert(result) File "/usr/lib/python2.7/dist-packages/markdown/__init__.py", line 280, in convert self.lines = prep.run(self.lines) File "/usr/lib/python2.7/dist-packages/markdown/preprocessors.py", line 175, in run if self.markdown_in_raw and 'markdown' in attrs.keys(): AttributeError: 'tuple' object has no attribute 'keys'
This is https://github.com/waylan/Python-Markdown/issues/76 which has been fixed in Markdown 2.2.0 - our servers are running the extremely outdated version 2.1.1 of this Python module however.
Expected behaviour
No errors are thrown and static pages are successfully created.
What to change
Update Markdown module on our servers.
Attachments (0)
Change History (8)
comment:1 Changed on 04/27/2016 at 11:24:11 AM by greiner
- Blocking 3987 added
comment:2 Changed on 04/27/2016 at 11:52:31 AM by trev
comment:3 Changed on 04/27/2016 at 12:03:51 PM by trev
- Cc matze added
- Component changed from Sitescripts to Infrastructure
- Description modified (diff)
Indeed, this is https://github.com/waylan/Python-Markdown/issues/76 (triggered by HTML comment) - fixed in version 2.2.0. I'd consider this an infrastructure issue then, we should update to a current version.
comment:4 Changed on 04/27/2016 at 12:25:18 PM by trev
- Owner set to trev
comment:5 Changed on 04/27/2016 at 12:26:57 PM by trev
- Review URL(s) modified (diff)
- Status changed from new to reviewing
comment:6 Changed on 04/27/2016 at 01:02:40 PM by matze
- Priority changed from Unknown to P2
- Ready set
comment:7 Changed on 04/27/2016 at 02:14:59 PM by abpbot
A commit referencing this issue has landed:
https://hg.adblockplus.org/infrastructure/rev/8db6eb82ec80
comment:8 Changed on 04/27/2016 at 03:41:02 PM by trev
- Resolution set to fixed
- Status changed from reviewing to closed
Deployed.
Server is running version 2.1.1 of the markdown module which is rather old. This might be the reason.