Anvil does not show HTML containing interactive network graph representations from Bokeh

Hi

I have generated some graph representations using “networkX”, “holoview” and “Bokeh” in Python.
I tried to load the resulting HTML file as a media_object in Anvil, yet nothing was shown in the UI.
I do not get any error but nothing is also shown.
The lines of codes in Anvil:

f = app_files.topic_1_graph_html
media_obj=anvil.BlobMedia(‘text/html’, f.get_bytes())
self.i_frame_1.url = media_obj.get_url(True)

i_frame_1 is from: Data visualizations from my jupyter notebook to display in my anvil app]

here is an example of the HTML that I want to show in the App:
https://drive.google.com/file/d/10a8NU1PlTIXDLQJ9nZ_2YhcUPNmM9VXa/view?usp=sharing

Bests
Shahrzad

I haven’t tried this, but what if you use an HTML Form as a component, and set the component’s html property to the html text?

Thanks a lot. I will try it and let you know.
Until then I have an update and question:
The issue that I mentioned earlier only exists, when I run the app in Chrome. If I run the App in Safari, there is not problem. So in principle, the issue seems to be with “updating the iFrame” in chrome. Would this have a solution from your side?
Bests
Shahrzad

Hi @shahrzadkhm,

It might help if you could share a clone link demonstrating this issue! (A simplified app would be fine)

Hi, Tanks a lot for your response.
The app is in general quite simple: https://anvil.works/build#clone:MZ5C2X56N5TZV3IC=VNWLJVKOSKHY4FZ24IKCW7WH

as far have checked it, it runs with no problem on Safari and Firefox. Google chrome however does not show the second html file (after one chooses a topic and presses “submit”.

Thanks a lot for your helps, in advance.
Shahrzad