axiros / terminal_markdown_viewer

Styled Terminal Markdown Viewer
Other
1.8k stars 105 forks source link

NameError: name 'unichr' is not defined #69

Closed ryan-gi closed 10 months ago

ryan-gi commented 5 years ago

unichr error has returned.

$:mdv --help

Output:

Option parsing error

...

File "/usr/local/Cellar/mdv/1.6.3_1/libexec/lib/python3.7/site-packages/mdv/markdownviewer.py", line 624, in replace_links cur += '%s ' % unichr(link_start_ord + cur_link) NameError: name 'unichr' is not defined

rodrigobdz commented 5 years ago

In Python 3 unichr is not defined. chr should be used instead. https://stackoverflow.com/a/2352047/2227405

rodrigobdz commented 5 years ago

That should be cover avoided by this check but I'm getting the same error. https://github.com/axiros/terminal_markdown_viewer/blob/80f333ba51dc2f1dfa854e203d3374a112aecbd3/mdv/markdownviewer.py#L346-L347

ms4720 commented 5 years ago

I just got this error:
File "/usr/local/Cellar/mdv/1.6.3_1/libexec/lib/python3.7/site-packages/mdv/markdownviewer.py", line 624, in replace_links cur += '%s ' % unichr(link_start_ord + cur_link)

ms4720 commented 5 years ago

according to rg unichr /usr/local/Cellar/mdv/1.6.3_1/libexec/lib/python3.7/site-packages/mdv the one instance I edited was the only instance there, one change and 0 other hits. maybe a release would fix this

rodrigobdz commented 5 years ago

rg unichr /usr/local/Cellar/mdv/1.6.3_1/libexec/lib/python3.7/site-packages/mdv

@ms4720 What is rg?

ms4720 commented 5 years ago

Rust grep I think, enhanced look through a directory tree of files grep

Brew info rg will get you the home page on a mac

haakonstorm commented 4 years ago

rg = ripgrep (BurntSushi/ripgrep)

axgkl commented 10 months ago

released, should be fixed.