Bug 233996 - devel/py-mdv: Crash when running `mdv --help`
Summary: devel/py-mdv: Crash when running `mdv --help`
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Emanuel Haupt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-13 22:14 UTC by Mateusz Piotrowski
Modified: 2019-01-06 16:54 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mateusz Piotrowski freebsd_committer 2018-12-13 22:14:50 UTC
> $ mdv --help
> Option parsing error
> Traceback (most recent call last):
>   File "/usr/local/bin/mdv", line 11, in <module>
>     load_entry_point('mdv==1.6.3', 'console_scripts', 'mdv')()
>   File "/usr/local/lib/python3.6/site-packages/mdv/markdownviewer.py", line 1342, in run
>     print(run_args(args, md=doc))
>   File "/usr/local/lib/python3.6/site-packages/mdv/markdownviewer.py", line 1309, in run_args
>     tab_length    = args.get('-b', 4))
>   File "/usr/local/lib/python3.6/site-packages/mdv/markdownviewer.py", line 1063, in main
>     the_html = MD.convert(md)
>   File "/usr/local/lib/python3.6/site-packages/markdown/__init__.py", line 375, in convert
>     newRoot = treeprocessor.run(root)
>   File "/usr/local/lib/python3.6/site-packages/mdv/markdownviewer.py", line 873, in run
>     formatter(doc, out)
>   File "/usr/local/lib/python3.6/site-packages/mdv/markdownviewer.py", line 868, in formatter
>     formatter(c, out, hir + 1, parent=el)
>   File "/usr/local/lib/python3.6/site-packages/mdv/markdownviewer.py", line 690, in formatter
>     links_list, t = replace_links(el, t)
>   File "/usr/local/lib/python3.6/site-packages/mdv/markdownviewer.py", line 624, in replace_links
>     cur += '%s ' % unichr(link_start_ord + cur_link)
> NameError: name 'unichr' is not defined

I'm running FreeBSD 13.0-CURRENT r341995, py36-mdv-1.6.3_1.
Comment 1 Roman Bogorodskiy freebsd_committer 2019-01-06 11:17:44 UTC
Looks like it was fixed upstream but haven't yet made it into release.

Fix: https://github.com/axiros/terminal_markdown_viewer/commit/834bfd8084d56bce283d60c660c58107b37524b1

Issue: https://github.com/axiros/terminal_markdown_viewer/issues/46
Comment 2 commit-hook freebsd_committer 2019-01-06 16:50:13 UTC
A commit references this bug:

Author: ehaupt
Date: Sun Jan  6 16:50:01 UTC 2019
New revision: 489508
URL: https://svnweb.freebsd.org/changeset/ports/489508

Log:
  Fix with python3

  PR:		233996
  Reported by:	0mp
  Submitted by:	novel (patch)
  MFH=		2019Q1 (blanket)

Changes:
  head/devel/py-mdv/Makefile
  head/devel/py-mdv/files/
  head/devel/py-mdv/files/patch-mdv_markdownviewer.py
Comment 3 commit-hook freebsd_committer 2019-01-06 16:52:17 UTC
A commit references this bug:

Author: ehaupt
Date: Sun Jan  6 16:51:21 UTC 2019
New revision: 489509
URL: https://svnweb.freebsd.org/changeset/ports/489509

Log:
  MFH: r489508

  Fix with python3

  PR:		233996
  Reported by:	0mp
  Submitted by:	novel (patch)
  MFH=		2019Q1 (blanket)
  Approved by:	ports-secteam (blanket)

Changes:
_U  branches/2019Q1/
  branches/2019Q1/devel/py-mdv/Makefile
  branches/2019Q1/devel/py-mdv/files/
Comment 4 Emanuel Haupt freebsd_committer 2019-01-06 16:54:03 UTC
Thank you both, novel and 0mp.