biolab / orange3

🍊 :bar_chart: :bulb: Orange: Interactive data analysis
https://orangedatamining.com
Other
4.7k stars 993 forks source link

AttributeError: module 'Orange.widgets.gui' has no attribute 'WebviewWidge #6713

Open JoaoGabrielTN opened 5 months ago

JoaoGabrielTN commented 5 months ago

orange 3.3 orange-text 1.15.0 OS linux mint victoria run it with the "python3 -m Orange.canvas" command

Expected behavior It's suposed to create a worcloud from a corpus file.

Actual behavior when run it appears an error message: 'Orange.widgets.gui' has no attribute 'WebviewWidget'.

Steps to reproduce the behavior Create corpus link corpus to preprrocessing text link preprocessing to wordcloud try to open wordcloud

JoaoGabrielTN commented 5 months ago

I solved it by installing webview through "pip3 install pywebview[qt]". The wordcloud widget opens, but does not show the wordcloud. Wordcloud error

markotoplak commented 5 months ago

The thing to install is actually pyqtwebegine. The problem stems from the fact that we could not add PyQt as a dependency of the pip package because that leads to other problems.

How to install pyqtwebegine depends on how PyQt was installed.

Thanks for opening the issue. I'll also check our installation instructions to see how we can improve them. Please report if any of these helped.

JoaoGabrielTN commented 5 months ago

It still doesn't appear.

after i run pip3 freeze | grep -i pyqt:

PyQt5==5.15.10 PyQt5-Qt5==5.15.2 PyQt5-sip==12.13.0 pyqtgraph==0.13.3 PyQtWebEngine==5.15.6 PyQtWebEngine-Qt5==5.15.2

I already have PyQt5 and pyqtwebengine. I reinstalled, both via pip3 and apt, and it did not solve the problem. I also tried to install pyqt6 and pyqt6-webengine, but with no success.

i run orange trough the command: orange-canvas

ales-erjavec commented 5 months ago

@JoaoGabrielTN Can you try runing

QTWEBENGINE_CHROMIUM_FLAGS="--disable-gpu --no-sandbox" orange-canvas
markotoplak commented 5 months ago

@JoaoGabrielTN, could you also try to see if the reports work? Open the File widget and click the report icon (third small icon at the bottom). Something like this should show up.

a

If you see a File description on the right, the problem is likely isolated to Text mining widgets.

JoaoGabrielTN commented 5 months ago
QTWEBENGINE_CHROMIUM_FLAGS="--disable-gpu --no-sandbox" orange-canvas

Thank you, this resolved the problem. The wordcloud now appears when I plot it.

markotoplak commented 5 months ago

@JoaoGabrielTN, can you perhaps try if it also works if you only use a single flag? Or do you need both?

@ales-erjavec, why does this work? What was your idea when you suggested the solution?

markotoplak commented 4 months ago

With new version of PyQT5 I now need QTWEBENGINE_CHROMIUM_FLAGS="--no-sandbox" web engine to work.