0

I essentially have a working program that creates interactive bokeh figures with CustomJS (widgets and tables) and it works fine in my IDE.

However, when I create an executable with PyInstaller of this code, I get the following error:

console.log("Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing")

Since I'm saving the figures as HTML and opening them with QtWebEngine, i'm guessing the issue is there? Im guessing QtWebEngine doesnt have access to the BokehJS library? The HTML themselves work well when opened with chrome.

Here's a small code snippet that covers the problematic code if it helps:

from bokeh.resources import INLINE
from bokeh.embed import file_html
from PyQt5 import QtWidgets, QtWebEngineWidgets, QtCore, QtGui

self.m_output = QtWebEngineWidgets.QWebEngineView()

html_file = Bgf.plot_bokeh(all_my_variables) # this function deals with the figure generation and output a bokeh Document that includes a single plot and widgets with JS

html_file.validate()
with open("html_test.html", "w", encoding="utf-8") as f:
    f.write(file_html(html_file, INLINE, "html_test_test"))
url = QtCore.QUrl.fromLocalFile(r"My_ABS_path")

self.ui.Vlayout_network.addWidget(self.m_output) # addind the WebEngine to a widget in the PyQT5 GUI
page = WebEnginePage(self.m_output)  # class webenginepage required for download signals
self.m_output.setPage(page)
self.m_output.load(url)
self.m_output.show()

Any ideas how i could fix my issue?

eyllanesc
  • 221,139
  • 17
  • 121
  • 189
Tango
  • 1
  • 1
  • It's been a long time, but last I recall the Qt web component ignored ` – bigreddot Oct 07 '21 at 16:28

0 Answers0