Closed DimanChauncey closed 6 months ago
Please set visualization='basic' or 'advance'
and set auto_open_html=False
. The html page will be generated but not opened.
but...the html page is almost empty when I open it in a browser. Like this.
And each item is same.
Can I copy all history files to the host machine and then use tools to render the image? How should I do
The generated HTML file needs to load other static files to render the page. If you move the file to another environment, it cannot find the resource correctly, so the page is almost blank.
To fix it: install OpenBox on both container and host machine. And move history file from docker to host machine:
# In docker: save history to json file first
history = optimizer.get_history()
history.save_json(...)
# Move json history to host machine
# On host machine: load history from json
history = History.load_json(...)
# Then render the page
history.visualize_html(...)
Hello, I deployed my experimental environment in a Docker container and used OpenBox to optimizing, but when visualizing, it cannot call webbrowser.open().
[2023-12-28 00:32:13,392][moc][ERROR][html_visualizer.py:473] Failed to open html file! Please open it manually: file:///root/logs/history/moc/moc_2023-12-28-00-32-09-230659.html Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/openbox/visualization/html_visualizer.py", line 471, in open_html raise ValueError('webbrowser.open() returned False.') ValueError: webbrowser.open() returned False.
Is there any way for me to copy the files to a host machine or a Windows machine and then open the browser and render the visualized website?
Thanks for your help!