vinayak-mehta / present

A terminal-based presentation tool with colors and effects.
https://present.readthedocs.io
Apache License 2.0
4.34k stars 165 forks source link

Present 0.6.0 fails immediately on my machine #120

Open mauvedeity opened 1 year ago

mauvedeity commented 1 year ago

present <file> fails immediately on my systems, irrespective of the markdown file I call it on: % present example.md

Steps used to install present:

  1. pip3 install present

Steps to reproduce the behavior: % present example.md

Expected behavior I expected to see my first slide as defined in example.md on screen.

Screenshots

Traceback (most recent call last):
  File "/Users/rhys.wilkins/Library/Python/3.11/bin/present", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/Users/rhys.wilkins/Library/Python/3.11/lib/python/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/rhys.wilkins/Library/Python/3.11/lib/python/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/Users/rhys.wilkins/Library/Python/3.11/lib/python/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/rhys.wilkins/Library/Python/3.11/lib/python/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/rhys.wilkins/Library/Python/3.11/lib/python/site-packages/present/cli.py", line 15, in cli
    slides = Markdown(filename).parse()
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/rhys.wilkins/Library/Python/3.11/lib/python/site-packages/present/markdown.py", line 39, in parse
    ast = markdown(text, renderer="ast")
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/rhys.wilkins/Library/Python/3.11/lib/python/site-packages/mistune/__init__.py", line 63, in markdown
    return md(text)
           ^^^^^^^^
  File "/Users/rhys.wilkins/Library/Python/3.11/lib/python/site-packages/mistune/markdown.py", line 104, in __call__
    return self.parse(s)[0]
           ^^^^^^^^^^^^^
  File "/Users/rhys.wilkins/Library/Python/3.11/lib/python/site-packages/mistune/markdown.py", line 84, in parse
    result = self.render_state(state)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/rhys.wilkins/Library/Python/3.11/lib/python/site-packages/mistune/markdown.py", line 45, in render_state
    return self.renderer(data, state)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'str' object is not callable

Environment Platform macOS-13.3.1-arm64-arm-64bit Terminal emulator: Terminal.app Python 3.11.3 (main, Apr 7 2023, 20:13:31) [Clang 14.0.0 (clang-1400.0.29.202)] Present 0.6.0

Additional context Can repro on Linux VM as well.

domma commented 1 year ago

Same for me. Obviously the mistune library has been updated and has breaking changes. It worked for me after removing mistune and manually installing mistune<3.

rprosenc commented 1 year ago

same for me :-(

v4ld3rr4m4 commented 1 year ago

Thanks , efectivly . install pip` install mistune==2

a4z commented 1 year ago

Thanks , efectivly . install pip` install mistune==2

thanks!