github-flavored-markdown-to-html icon indicating copy to clipboard operation
github-flavored-markdown-to-html copied to clipboard

Problem with module emoji

Open noisecode3 opened this issue 3 years ago • 0 comments

With emoji python3 module version >= 2.0.0 I get the following error

Traceback (most recent call last):
  File "/usr/lib64/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib64/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/marbangens/.local/lib/python3.9/site-packages/gh_md_to_html/__main__.py", line 5, in <module>
    cmd_to_main()
  File "/home/marbangens/.local/lib/python3.9/site-packages/gh_md_to_html/__init__.py", line 1618, in cmd_to_main
    result = main(**vars(parser.parse_args()))
  File "/home/marbangens/.local/lib/python3.9/site-packages/gh_md_to_html/__init__.py", line 903, in main
    html_content = find_and_render_formulas_in_html(html_content, formula_mapper, special_chars_in_code_blocks,
  File "/home/marbangens/.local/lib/python3.9/site-packages/gh_md_to_html/__init__.py", line 451, in find_and_render_formulas_in_html
    shortcode_to_emoji(emoji_shortcode, emoji_support)
  File "/home/marbangens/.local/lib/python3.9/site-packages/gh_md_to_html/__init__.py", line 97, in shortcode_to_emoji
    if shortcode not in emoji.EMOJI_ALIAS_UNICODE_ENGLISH:

Quick fix:

pip uninstall emoji

pip install emoji==1.7.0

noisecode3 avatar Nov 24 '22 14:11 noisecode3