Page 1 of 1

[Solved]Frescobaldi and Calibre crash in Mageia 6 R

PostPosted: Jun 21st, '17, 21:29
by banjo
I am installing Mageia6 RC as an experiment to see what has been changed/fixed/etc from Mageia5. It is going well so far, but there is a problem with a couple of the programs.

Frescobaldi and Calibre will not run because of missing pieces in PyQt5.

Running frescobaldi:
Code: Select all
[admin@localhost ~]$ frescobaldi
Traceback (most recent call last):
  File "/bin/frescobaldi", line 7, in <module>
    import main
  File "/usr/lib/python3.5/site-packages/frescobaldi_app/main.py", line 42, in <module>
    import remote           # IPC with other Frescobaldi instances
  File "/usr/lib/python3.5/site-packages/frescobaldi_app/remote/__init__.py", line 29, in <module>
    from PyQt5.QtNetwork import QLocalServer, QLocalSocket
ImportError: No module named 'PyQt5.QtNetwork'


Running calibre:
Code: Select all
[admin@localhost ~]$ calibre
Traceback (most recent call last):
  File "/bin/calibre", line 20, in <module>
    sys.exit(calibre())
  File "/usr/lib64/calibre/calibre/gui_launch.py", line 68, in calibre
    from calibre.gui2.main import main
  File "/usr/lib64/calibre/calibre/gui2/__init__.py", line 8, in <module>
    from PyQt5.QtWidgets import QStyle  # Gives a nicer error message than import from Qt
ImportError: /usr/lib64/python2.7/site-packages/PyQt5/QtWidgets.so: file too short


I have uninstalled and reinstalled the programs but that did not help. I looked into doing the same with PyQt5, but it is not found in the repositories. I suppose that it was installed on the side, but I have no idea where it came from or how it got there. The whole python/Qt/PyQt structure is incomprehensible to me at this point, so I don't know where to begin trouble shooting this.

Any hints on where I could start looking would be much appreciated.

Thanks,
Banjo
(_)=='=~

Re: Frescobaldi and Calibre crash in Mageia 6 RC

PostPosted: Jun 21st, '17, 23:38
by morgano
Is this a fresh install, or upgrade from Mageia 5 ?
Fully updated?
There is a lot of python-qt5* packages.

Re: Frescobaldi and Calibre crash in Mageia 6 RC

PostPosted: Jun 22nd, '17, 00:52
by banjo
It is a total fresh installation. I repartitioned and reformatted the disk to make this the only system on the disk.

Is python-qt5 the same as PyQt5? I was searching for PyQt5.

Thanks for the response.

Banjo
(_)=='=~
Edit:
OK. I looked it up. The package is named differently from the tool name. I will go see if I can re-install or check it out.
Thanks

Re: Frescobaldi and Calibre crash in Mageia 6 RC

PostPosted: Jun 22nd, '17, 02:15
by banjo
I searched the repositories for python-qt5 and found that very few packages were installed by default. Here is the default list.
Code: Select all
python-qt5-widgets-5.6-8.mga6
python-qt5-core-5.6-8.mga6
python-qt5-svg-5.6-8.mga6
python-qt5-webkitwidgets-5.6-8.mga6
python-qt5-printsupport-5.6-8.mga6
python-qt5-xml-5.6-8.mga6
python-qt5-webkit-5.6-8.mga6
python-qt5-network-5.6-8.mga6
python-qt5-gui-5.6-8.mga6


It has a network package in it, but I installed the other stuff just to be sure, and the list packages went to the following:

Code: Select all
python-qt5-x11extras-5.6-8.mga6
python-qt5-designer-5.6-8.mga6
python-qt5-positioning-5.6-8.mga6
python-qt5-webenginewidgets-5.6-8.mga6
python-qt5-widgets-5.6-8.mga6
python-qt5-multimedia-5.6-8.mga6
python-qt5-location-5.6-8.mga6
python-qt5-sensors-5.6-8.mga6
python-qt5-enginio-5.6-8.mga6
python-qt5-qml-5.6-8.mga6
python-qt5-core-5.6-8.mga6
python-qt5-svg-5.6-8.mga6
python-qt5-multimediawidgets-5.6-8.mga6
python-qt5-webchannel-5.6-8.mga6
python-qt5-sql-5.6-8.mga6
python-qt5-webenginecore-5.6-8.mga6
python-qt5-webkitwidgets-5.6-8.mga6
python-qt5-xmlpatterns-5.6-8.mga6
python-qt5-bluetooth-5.6-8.mga6
python-qt5-websockets-5.6-8.mga6
python-qt5-dbus-5.6-8.mga6
python-qt5-printsupport-5.6-8.mga6
python-qt5-test-5.6-8.mga6
python-qt5-serialport-5.6-8.mga6
python-qt5-xml-5.6-8.mga6
python-qt5-quickwidgets-5.6-8.mga6
python-qt5-5.6-8.mga6
python-qt5-webkit-5.6-8.mga6
python-qt5-network-5.6-8.mga6
python-qt5-nfc-5.6-8.mga6
python-qt5-quick-5.6-8.mga6
python-qt5-opengl-5.6-8.mga6
python-qt5-gui-5.6-8.mga6


When I run frescobaldi it still fails looking for PyQt5.QtNetwork.

Not sure what to try next.

Banjo
(_)=='=~

Re: Frescobaldi and Calibre crash in Mageia 6 RC

PostPosted: Jan 20th, '18, 04:40
by banjo
I am opening this old thread because I have been having the same problem with Frescobaldi on a new, fresh installation of Mageia 6. That was disappointing because I use Frescobaldi a lot, and if I start using Magia6 the program would have to work.

Here is the problem. When I ran Frescobaldi, I got the following errors:

Code: Select all
[poobah@localhost ~]$ frescobaldi
Traceback (most recent call last):
  File "/bin/frescobaldi", line 7, in <module>
    import main
  File "/usr/lib/python3.5/site-packages/frescobaldi_app/main.py", line 42, in <module>
    import remote           # IPC with other Frescobaldi instances
  File "/usr/lib/python3.5/site-packages/frescobaldi_app/remote/__init__.py", line 29, in <module>
    from PyQt5.QtNetwork import QLocalServer, QLocalSocket
ImportError: No module named 'PyQt5.QtNetwork'


So parts of the tangled web of Python are missing. The question is what.

After a few hours of searching the web, I found some information on:

https://github.com/wbsoft/frescobaldi/wiki/Run-Frescobaldi-3-on-Linux

where the dependencies for frescobali are listed as:

python3-pyqt5
python3-pyqt5.qtsvg
python3-pyqt5.qtwebkit

On Debian based distributions:
sudo apt install python3-pyqt5 python3-pyqt5.qtsvg python3-pyqt5.qtwebkit

After some searching of the Mageia repositories, this translated into the following packages on Mageia, which for some reason were not included in the Frescobaldi dependencies.

python3-qt5
python3-qt5-svg
python3-qt5-webkit

I installed those packages, and Frescobaldi runs.

Unfortunately, when I tried to process a .ly file into a .pdf file, I got the following error:

Code: Select all
Starting lilypond 2.19.61 [Test.ly]...
ERROR: In procedure primitive-load-path:
ERROR: Unable to find file "lily.scm" in load path
Exited with return code 1.

Searching for lily.scm I found it here.

./usr/share/lilypond/2.19.61/scm/lily.scm

After hours of more web searching and poking around on this installation, I found that there appears to be a lilypond installed in two different locations, /usr/bin, and /bin. Neither appears to be a link.

Code: Select all
[poobah@localhost ~]$ ls -l /bin/lilypond
-rwxr-xr-x 1 root root 5011648 Jun  2  2017 /bin/lilypond*
[poobah@localhost ~]$ ls -l /usr/bin/lilypond
-rwxr-xr-x 1 root root 5011648 Jun  2  2017 /usr/bin/lilypond*


The PATH variable looks in /bin first
Code: Select all
[poobah@localhost ~]$ echo $PATH
/bin:/usr/bin:/usr/local/bin:/usr/local/games:/usr/games:/usr/lib64/qt4/bin:/usr/lib64/qt5/bin:/home/poobah/.local/bin:/home/poobah/bin
[poobah@localhost ~]$ which lilypond
/bin/lilypond


Apparently Frescobaldi wants to run lilypond only from /usr/bin and the PATH is confusing it. Calling lilypond in /bin causes Frescobaldi to error out. I do not know why that happens.

To fix the problem, I had to point Frescobaldi to /usr/bin/lilypond instead of /bin/lilypond. I did this in the Frescobaldi preferences editor.

2018-01-19_212140_668587063.png
2018-01-19_212140_668587063.png (102.58 KiB) Viewed 1716 times


The entry for /usr/bin/lilypond is highlighted because I made it the default. Once I made that change, Frescobaldi works fine. I am guessing that when Frescobaldi installed lilypond as a dependency, it put it in /usr/bin when there was already an installed version in /bin, and then the PATH was pointing to the wrong installation. I am just guessing.

Anyway, this appears to be working again, so I thought I would post the solution in case anyone else is struggling with a similar problem. Frescobaldi is not a heavily used tool, so there was very little help out on the web.

Banjo
(_)=='=~

Re: Frescobaldi and Calibre crash in Mageia 6 RC

PostPosted: Jan 20th, '18, 15:31
by doktor5000
banjo wrote:Anyway, this appears to be working again, so I thought I would post the solution in case anyone else is struggling with a similar problem. Frescobaldi is not a heavily used tool, so there was very little help out on the web.

Well, you should report it as a bug so it may eventually be fixed, otherwise you will have to fix it again and again ...

Or is this maybe your report? https://bugs.mageia.org/show_bug.cgi?id=21344

Re: [Solved]Frescobaldi and Calibre crash in Mageia 6 R

PostPosted: Jan 20th, '18, 16:38
by banjo
Nope. That isn't my report. I am not tied into the bug reporting system yet. I will see if I can figure out how to sign up and how the bug tracking culture works.

I had a similar issue with Calibre last Summer, so yesterday I installed Calibre and tried it, and it worked out of the box.

Banjo
(_)=='=~

Re: [Solved]Frescobaldi and Calibre crash in Mageia 6 R

PostPosted: Jan 20th, '18, 18:46
by doktor5000
banjo wrote:I am not tied into the bug reporting system yet. I will see if I can figure out how to sign up and how the bug tracking culture works.

Yes you are already tied in, same account as for the forums. See https://wiki.mageia.org/en/Mageia.org_user_account

Re: [Solved]Frescobaldi and Calibre crash in Mageia 6 R

PostPosted: Jan 21st, '18, 05:45
by banjo
Oh. OK. I did not know that. I will go read up on it and see how I can contribute.

Thanks
Banjo
(_)=='=~