present icon indicating copy to clipboard operation
present copied to clipboard

Error: 'InlineHtml' is not defined. Fresh install of present, unable to get it working with sample.md

Open dsarathy opened this issue 2 years ago • 1 comments

Describe the bug After installation, I receive the following error when attempting to perform present sample.md.

Traceback (most recent call last):
  File "/opt/homebrew/bin/present", line 8, in <module>
    sys.exit(cli())
  File "/opt/homebrew/lib/python3.9/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/opt/homebrew/lib/python3.9/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/opt/homebrew/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/homebrew/lib/python3.9/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/opt/homebrew/lib/python3.9/site-packages/present/cli.py", line 18, in cli
    show.play()
  File "/opt/homebrew/lib/python3.9/site-packages/present/slideshow.py", line 145, in play
    self.slides = [
  File "/opt/homebrew/lib/python3.9/site-packages/present/slideshow.py", line 146, in <listcomp>
    Slide(self, self.get_effects(slide), slide.fg_color, slide.bg_color)
  File "/opt/homebrew/lib/python3.9/site-packages/present/slideshow.py", line 124, in get_effects
    effects.extend(_base(self.screen, e, row, fg_color, bg_color))
  File "/opt/homebrew/lib/python3.9/site-packages/present/effects.py", line 130, in _base
    Text(element.render()),
  File "/opt/homebrew/lib/python3.9/site-packages/present/slide.py", line 367, in render
    Element = eval(element_name)
  File "<string>", line 1, in <module>
NameError: name 'InlineHtml' is not defined

I am unable to use the present command on any markdown file, as I get the same error every time.

Steps to reproduce the bug Steps used to install present:

  1. pip install present seemed to work with no issues

Steps to reproduce the behavior:

  1. On a MacOS, simply use pip install present, then git clone <repo> and cd /examples, then run present sample.md.
  2. It does not work, and results in the error listed above

Expected behavior Well, hopefully the default slideshow should run. I'm thinking there is some dependency that is not installed? But I cannot figure out what it is--I am new to python, I apologize.

Slides I am using the included sample.md file.

Environment

  • OS: MacOS
  • Terminal: iTerm2
  • Python version: 3.9.9
  • present version: the latest (installed today). I cannot find specific version number as present --version is not an option. Sorry!

dsarathy avatar Jan 13 '22 19:01 dsarathy