Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
JoaoGabrielTN opened this issue Jan 24, 2024 · 8 comments
Assignees
Labels
snack This will take an hour or two

Comments

@JoaoGabrielTN
Copy link

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 JoaoGabrielTN added the bug report Bug is reported by user, not yet confirmed by the core team label Jan 24, 2024
@JoaoGabrielTN
Copy link
Author

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

@janezd janezd added snack This will take an hour or two and removed bug report Bug is reported by user, not yet confirmed by the core team labels Jan 26, 2024
@markotoplak
Copy link
Member

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.

  • If you are using your system's system python installation directly and if your PyQt came with your Linux distribution, install the proper distribution package.

  • If you installed PyQt it from pip, then continue with pip. But first, you will need to know which version of PyQt you have: run pip3 freeze | grep -i pyqt

    • If you see PyQt5 in the results, install pyqtwebengine: pip3 install pyqtwebengine

    • If you see PyQt6 in the results, install it so: pip3 install pyqt6-webengine

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
Copy link
Author

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
Copy link
Contributor

@JoaoGabrielTN Can you try runing

QTWEBENGINE_CHROMIUM_FLAGS="--disable-gpu --no-sandbox" orange-canvas

@markotoplak
Copy link
Member

@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
Copy link
Author

QTWEBENGINE_CHROMIUM_FLAGS="--disable-gpu --no-sandbox" orange-canvas

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

@markotoplak
Copy link
Member

@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
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
snack This will take an hour or two
Projects
None yet
Development

No branches or pull requests

4 participants