question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AttributeError AttributeError: module 'mistune' has no attribute 'html'

See original GitHub issue

This is my first time using contextualise.

Got it installed, created my first map. Then I went to edit the ‘Home’ topic for my map. I pasted in markdown text from a TiddlyWiki entry I had made.

It immediately went to this error page, and now when I go to ‘view map’, this same error page shows up.

AttributeError
AttributeError: module 'mistune' has no attribute 'html'

Traceback (most recent call last)
File "/home/brizz/Server/contextualise/.env/lib/python3.7/site-packages/flask/app.py", line 2464, in __call__
return self.wsgi_app(environ, start_response)
File "/home/brizz/Server/contextualise/.env/lib/python3.7/site-packages/flask/app.py", line 2450, in wsgi_app
response = self.handle_exception(e)
File "/home/brizz/Server/contextualise/.env/lib/python3.7/site-packages/flask/app.py", line 1867, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/brizz/Server/contextualise/.env/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/home/brizz/Server/contextualise/.env/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/home/brizz/Server/contextualise/.env/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/brizz/Server/contextualise/.env/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/brizz/Server/contextualise/.env/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/home/brizz/Server/contextualise/.env/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/home/brizz/Server/contextualise/.env/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/brizz/Server/contextualise/contextualise/topic.py", line 136, in view
occurrences["text"] = mistune.html(occurrence.resource_data.decode())
AttributeError: module 'mistune' has no attribute 'html'

the last of the traceback:

File "/home/brizz/Server/contextualise/contextualise/topic.py", line 136, in view
        "notes": [],
    }
    for occurrence in topic_occurrences:
        if occurrence.instance_of == "text" and occurrence.scope == session["current_scope"]:
            if occurrence.resource_data:
                occurrences["text"] = mistune.html(occurrence.resource_data.decode())
        elif occurrence.instance_of == "image":
            occurrences["images"].append(
                {"title": occurrence.get_attribute_by_name(
                    "title").value, "url": occurrence.resource_ref, }
            )
AttributeError: module 'mistune' has no attribute 'html'

I tried uninstalling/reinstalling mistune with pip. …no luck.

I created a new map, and just typed ‘123’ in the topic edit–and reached the same page. So I’m wondering if maybe I screwed up install process somewhere?

Any help/guidance you can provide would be much appreciated.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
brizzbanecommented, May 30, 2020

lol–was just going to reply with this below … and then your reply appeared. thank you!

@brizzbane You’re welcome. If you have any questions (or hit any other bugs), just let me know 😃

an example of what I am wondering how to do, look here:

https://contextualise.dev/topics/view/1/home

at the above site what is the proper way to link to “topic-maps”. I’m hoping that it isn’t just a hard link to exact url? …that there is some way to actually link so that if topics-maps was renamed, the link would reflect that change w/out you having to update the text in view/1/home …

—just wanted to be clear, understood your response, I guess I just wanted to reply and to say–I was looking at that exact page that you referenced, trying to figure out how you made that link.

Thanks for your help 😃. 👍

1reaction
brizzbanecommented, May 30, 2020

@brettkromkamp --since you offered 😛

…how do you link to another topic (say “blah”) w/in contextualise, (using markdown). I’m assuming linking:

[blah](http://127.0.0.1:5000/topic/s/view/blah/1)

isn’t the right way to do it. I want to link within the original topic’s text (not have link on the side, or below that shows that it may be related). …so I will write about many different topics, and want to link to those other topics within the main text…

I’m super newb to this. …If I am asking this question, is contextualise maybe ‘too much’ for what I’m wanting to do? (I love TiddlyWiki, …but I also LOVE Python, and contextualise’s multi-user capabilities…)

I’ve been looking for a minute now through docs/and the demo of contextualise. I would have just viewed the source of the topic to see how you do it–but I can’t, since I’m not a user.

Sorry for so much text. Is my question clear?

Read more comments on GitHub >

github_iconTop Results From Across the Web

nbconvert AttributeError: module 'mistune' has no attribute ...
nbconvert 6.4.4 fails using mistune 2.0.4 Install/update your conda env to those versions (latest) and creating or accessing any notebook ...
Read more >
AttributeError: module 'mistune' has no attribute 'BlockGrammar'
If you're seeing the error AttributeError: module 'mistune' has no attribute 'BlockGrammar' it might be that you're still using the cell...
Read more >
Error while creating new notebook - Jupyter Community Forum
BlockGrammar): AttributeError: module 'mistune' has no attribute 'BlockGrammar' [E 16:27:25.771 NotebookApp] { "Host": "localhost:8888", ...
Read more >
AttributeError: Module 'mistune' Has No Attribute ... - C# Corner
This blog describes the solution to the error: AttributeError: module 'mistune' has no attribute 'BlockGrammar'.
Read more >
nbconvert: FTBFS: AttributeError: module 'mistune' has no ...
Bug#1002372: nbconvert: FTBFS: AttributeError: module 'mistune' has no attribute 'BlockGrammar'. 370 views.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found