We have moved to a new Sailfish OS Forum. Please start new discussions there.
1

Why did PyQt stop working?

asked 2019-09-07 15:18:04 +0200

tsiksum gravatar image

Hello everybody,

I'm not sure whether this is a sailfish issue or a pyqt issue.

Years ago I installed pyqt-5.1.1-1.armv7hl.rpm from https://openrepos.net/content/sailfishlib/pyqt.
It worked fine until spring.
But then I had to learn that my application kalli-pyqt5.py did not launch anymore. When I try to start it I get:

[nemo@Sailfish Kal-pyqt5]$ ./kalli-pyqt5.py
sys.path:  ['/home/nemo/.bin/Kal-pyqt5', '/usr/lib/python37.zip', '/usr/lib/python3.7', '/usr/lib/python3.7/lib-dynload', '/usr/lib/python3.7/site-packages']
Traceback (most recent call last):
File "./kalli-pyqt5.py", line 14, in <module>
from PyQt5.QtCore import * SystemError: initialization of QtCore failed without raising an exception

As to sys.path:
/home/nemo/.bin/Kal-pyqt5 does not contain PyQt.
/usr/lib/python37.zip does not exist.
/usr/lib/python3.7 does not contain PyQt.
/usr/lib/python3.7/lib-dynload contains a number of files named .cpython-37m-arm-linux-gnueabihf.so. /usr/lib/python3.7/site-packages contains a directory named PyQt5 with a number of files named Qt.so.

I have no idea why it stopped working or how to fix this.
Is it because sailfish upgraded from Python 3.4 to Python 3.7 somewhen?
Is it because the file in */PyQt5 are *.so files instead of *.py?

Any idea?

TIA
tsiksum

edit retag flag offensive close delete

Comments

The old PyQt version for Python 3.4 certainly will not work with the current Python 3.7. For this reason I went back to an older version (3.0.1) of the OS in March.

It would be good to have PyQt binaries for download. It's not possible to build PyQt on the device. You need to use the SDK build engine.

I'm wondering why you have a PyQt5 directory under your python3.7 directory. What date do the .so files have?

Dietmar ( 2019-09-07 15:27:20 +0200 )edit

2 Answers

Sort by » oldest newest most voted
1

answered 2019-09-08 05:04:53 +0200

lethe gravatar image

Here are pyqt5 packages for python3.7: https://anonfile.com/p1Tejc54na/pyqt5-sailfishos_txz

I built those a couple of weeks ago on my XA2 (before being informed here that this cannot be done ;) ) for an experiment which I since abandoned...

I will not upload them on openrepos, as I have no intend to maintain or update those packages. If you want to do that, be my guest...

*.spec files are included for use with rpmbuild, in case you want to re-build the packages, but before doing so on a device, read the comment in python3-pyqt5.spec!

edit flag offensive delete publish link more

Comments

Thanks a lot. The "cannot" did refer to the warning when installing the qt devel packages on earlier Sailfish OS versions about breaking the system (libhybris-libGLESv2 etc.).

I think your rpms are missing a dependendy:

pkcon install qt5-qtconnectivity-qtbluetooth
Dietmar ( 2019-09-08 22:18:37 +0200 )edit

Yes, it's quite possible that the dependency to qt5-qtconnectivity-qtbluetooth is missing. I've never tried installing the packages on a clean system...

lethe ( 2019-09-09 06:23:41 +0200 )edit
0

answered 2019-09-07 17:55:25 +0200

tsiksum gravatar image

Dietmar, thanks for your response.

Trying to fix it I compiled PyQt (on the device) hoping it will work. Therefore I have PyQt in the python3.7 directory. But it won't work either way.

How did you downgrade to 3.0.1?

edit flag offensive delete publish link more

Comments

This method did work for me to go to 3.0.1: https://together.jolla.com/question/39913/is-there-a-way-to-downgrade/

It does not work with arbitrary combinations of current and old versions, though.

I'm wondering that compiling did work at all. I don't remember the exact errors that I got, but there were clearly some mismatches, probably due to libhybris. With Python 3.4 I also did use my own version, but I don't remember why I made this in the beginning. It's some years now...

Dietmar ( 2019-09-07 18:51:28 +0200 )edit
Login/Signup to Answer

Question tools

Follow
4 followers

Stats

Asked: 2019-09-07 15:18:04 +0200

Seen: 933 times

Last updated: Sep 08 '19