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

TypeError: 'str' object is not callable #116

Closed
alirezaunix opened this issue Jul 29, 2022 · 5 comments
Closed

TypeError: 'str' object is not callable #116

alirezaunix opened this issue Jul 29, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@alirezaunix
Copy link

alirezaunix commented Jul 29, 2022

any slides have this issue
python3.10, 3.9 , 3.8

@alirezaunix alirezaunix added the bug Something isn't working label Jul 29, 2022
@ghost
Copy link

ghost commented Aug 17, 2022

any slides have this issue python3.10, 3.9 , 3.8
need to update "nbconvert" package
you also may need to reinstall "mistune" to the compatible version.

@erwin
Copy link

erwin commented Aug 21, 2022

Same issue for me: TypeError: 'str' object is not callable

❯ present sample.md
❯ present sample.md            
Traceback (most recent call last):
  File "/bin/present", line 8, in <module>
    sys.exit(cli())
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/present/cli.py", line 15, in cli
    slides = Markdown(filename).parse()
  File "/usr/lib/python3.10/site-packages/present/markdown.py", line 39, in parse
    ast = markdown(text, renderer="ast")
  File "/usr/lib/python3.10/site-packages/mistune/__init__.py", line 53, in markdown
    return md(text)
  File "/usr/lib/python3.10/site-packages/mistune/markdown.py", line 65, in __call__
    return self.parse(s)[0]
  File "/usr/lib/python3.10/site-packages/mistune/markdown.py", line 45, in parse
    result = self.block.render(state, self.inline)
  File "/usr/lib/python3.10/site-packages/mistune/block_parser.py", line 447, in render
    return self._call_render(state.tokens, state, inline)
  File "/usr/lib/python3.10/site-packages/mistune/block_parser.py", line 452, in _call_render
    return inline.renderer(data)
TypeError: 'str' object is not callable

I also ran pip3 install nbconvert and pip3 install mistune to update those to the current version, but still the same issue.

The demos look very cool!

To me, this seems like a it would be a great app to package with Docker.

If there's an more reliable / easier route than Docker, that's a great idea too, because often times doing presentations you'll have to use a venue provided computer, and those systems usually only have:

  1. Ancient Browser
  2. PDF Reader
  3. PowerPoint
  4. Maximally unreliable Wifi...

Fortunately, they'll usually let you install whatever you want.

@ghost
Copy link

ghost commented Aug 24, 2022

  • Python 3.10.4
  • mistune 2.0.4
  • nbconvert 7.0.0

check if you have same versions with pip show {package_name}

@erwin
Copy link

erwin commented Aug 25, 2022

Thank you. The problem for me was nbconvert was at 6.5.3.
Once upgrading nbconvert to 7.0.0, present is working fine for me.

❯ python --version 
Python 3.10.6

❯ pip3 show mistune | grep '^Version'
Version: 2.0.4

❯ pip3 show nbconvert | grep '^Version'
Version: 6.5.3
pip3 install --upgrade nbconvert

Now I'm at:

❯ pip3 show nbconvert | grep '^Version'
Version: 7.0.0

@alirezaunix
Copy link
Author

Thank you for your answer and for your update. It solved

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

No branches or pull requests

2 participants