Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dsarathy opened this issue Jan 13, 2022 · 1 comment · May be fixed by #119
Labels
bug Something isn't working

Comments

@dsarathy
Copy link

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 dsarathy added the bug Something isn't working label Jan 13, 2022
@Lissy93
Copy link

Lissy93 commented Jan 13, 2023

I'm seeing this too. Looks like it's caused by an update in one of the dependencies, specifically mistune.

I resoved the issue by downgrading it, using: pip install --force-reinstall -v "mistune==2.0.0a4"

Hope that helps :)

@captn3m0 captn3m0 linked a pull request Jan 13, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants