codesardine / jak

Hybrid web/desktop applications on Linux
http://codesardine.github.io/Jade-Application-Kit/
GNU General Public License v3.0
89 stars 18 forks source link

Fix Pyside2 imports #82

Closed hbarsaiyan closed 3 years ago

hbarsaiyan commented 3 years ago

I am working on this https://github.com/hbarsaiyan/google-docs-online. Using python-jade-application-kit in Manjaro the app is working fine but when using Jade-Application-Kit from PyPI I run into this error:

JAK v3.5.6
'bindings'
Traceback (most recent call last):
  File "/usr/bin/google-docs-online", line 4, in <module>
    from JAK.Application import JWebApp
  File "<frozen zipimport>", line 259, in load_module
  File "/usr/lib/python3.8/site-packages/Jade_Application_Kit-3.5.6-py3.8.egg/JAK/Application.py", line 9, in <module>
  File "<frozen zipimport>", line 259, in load_module
  File "/usr/lib/python3.8/site-packages/Jade_Application_Kit-3.5.6-py3.8.egg/JAK/Settings.py", line 10, in <module>
ImportError: /home/harsh/.local/lib/python3.8/site-packages/PySide2/Qt/lib/libQt5Network.so.5: undefined symbol: _ZdaPvm, version Qt_5

and after export JAK_PREFERRED_BINDING=PyQt5 I get this error:

JAK v3.5.6
Traceback (most recent call last):
  File "/usr/bin/google-docs-online", line 4, in <module>
    from JAK.Application import JWebApp
  File "/usr/lib/python3.8/site-packages/JAK/Application.py", line 9, in <module>
    from JAK import Settings
  File "/usr/lib/python3.8/site-packages/JAK/Settings.py", line 8, in <module>
    from PyQt5.QtWebEngineWidgets import QWebEngineSettings
ModuleNotFoundError: No module named 'PyQt5.QtWebEngineWidgets'
hbarsaiyan commented 3 years ago

Installing python-pyqtwebengine fixed it. Sorry for the mess. Besides the AUR package has also been updated so all good now.

codesardine commented 3 years ago

At the moment is not working with Pyside2, let me reopen this.

hbarsaiyan commented 3 years ago

At the moment is not working with Pyside2, let me reopen this.

btw is there any way i can mention this export JAK_PREFERRED_BINDING=PyQt5 in the app code rather than in jak.conf?

codesardine commented 3 years ago

You don't need jak.conf you can just export the variable in your OS under /etc/environment

Steffan153 commented 3 years ago

It doesn't work to just export it in your .bashrc?

hbarsaiyan commented 3 years ago

Yeah it can be done by exporting under the environment but it is on AUR and I don't know if we are allowed to change environment variables. Right now I am doing printf '%s\n' '[bindings]' 'JAK_PREFERRED_BINDING=PyQt5' > $HOME/.config/jak.conf.

codesardine commented 3 years ago

@Steffan153 it should work on .bashrc also. @hbarsaiyan you can also use /etc/jak.conf.