frescobaldi 2: could not load popplerqt4 module

122 views
Skip to first unread message

rosea grammostola

unread,
Nov 20, 2011, 8:51:52 AM11/20/11
to fresc...@googlegroups.com
Hi,

See subject. I have this installed afaik
http://code.google.com/p/python-poppler-qt4/

Suggestions?

Ubuntu 10.04

Regards,

~r

rosea grammostola

unread,
Nov 20, 2011, 8:56:06 AM11/20/11
to fresc...@googlegroups.com
Frescobaldi: 1.9.2

Python: 2.6.5 -- Qt: 4.6.2 -- PyQt4: 4.7.2 -- sip: 4.10.1
OS: Linux-2.6.39-3-lowlatency-i686-with-Ubuntu-10.04-lucid

Traceback (most recent call last):
File "/usr/lib/python2.6/dist-packages/frescobaldi_app/job.py", line
167, in _finished
self._bye(success)
File "/usr/lib/python2.6/dist-packages/frescobaldi_app/job.py", line
180, in _bye
self.done(success)
File "/usr/lib/python2.6/dist-packages/frescobaldi_app/signals.py",
line 175, in emit
l.call(args, kwargs)
File "/usr/lib/python2.6/dist-packages/frescobaldi_app/signals.py",
line 227, in call
self.func(obj, *args[self.argslice], **kwargs)
File
"/usr/lib/python2.6/dist-packages/frescobaldi_app/musicpreview.py", line
127, in _done
self.setDocuments(pdfs)
File
"/usr/lib/python2.6/dist-packages/frescobaldi_app/musicpreview.py", line
146, in setDocuments
self.selectDocument(0)
File
"/usr/lib/python2.6/dist-packages/frescobaldi_app/musicpreview.py", line
151, in selectDocument
self._view.load(self._documents[index].document())
File
"/usr/lib/python2.6/dist-packages/frescobaldi_app/qpopplerview/view.py",
line 117, in load
self.surface().pageLayout().load(document)
File
"/usr/lib/python2.6/dist-packages/frescobaldi_app/qpopplerview/layout.py",
line 322, in load
for num in range(document.numPages()):
AttributeError: 'NoneType' object has no attribute 'numPages'

Optionally describe below what you were doing:

Score setup, jazz guitar, preview

Wilbert Berendsen

unread,
Nov 21, 2011, 5:55:23 AM11/21/11
to fresc...@googlegroups.com
Op Sun, 20 Nov 2011 14:56:06 +0100
rosea grammostola <rosea.gr...@gmail.com> schreef:

> AttributeError: 'NoneType' object has no attribute 'numPages'

I just fixed this error, that occurs if popplerqt4 can't be loaded.

Try installing Python-Poppler-Qt4 (different from python-poppler, which
is GTK-based) :-)

Make sure Python-Poppler-Qt4 is compiled and installed for the same
Python version as Frescobaldi.

--
Wilbert Berendsen
(http://www.wilbertberendsen.nl)

Wilbert Berendsen

unread,
Nov 21, 2011, 5:56:50 AM11/21/11
to fresc...@googlegroups.com
Op Sun, 20 Nov 2011 14:51:52 +0100
rosea grammostola <rosea.gr...@gmail.com> schreef:

> See subject. I have this installed afaik
> http://code.google.com/p/python-poppler-qt4/
>
> Suggestions?

Try this on a command line:

python

>>> import popplerqt4

If that yields an ImportError, popplerqt4 is not installed correctly.

rosea grammostola

unread,
Nov 21, 2011, 8:02:45 AM11/21/11
to fresc...@googlegroups.com
On 11/21/2011 11:56 AM, Wilbert Berendsen wrote:
> Op Sun, 20 Nov 2011 14:51:52 +0100
> rosea grammostola<rosea.gr...@gmail.com> schreef:
>
>> See subject. I have this installed afaik
>> http://code.google.com/p/python-poppler-qt4/
>>
>> Suggestions?
> Try this on a command line:
>
> python
>
>>>> import popplerqt4
> If that yields an ImportError, popplerqt4 is not installed correctly.
>
I get the import error. But when building popplerqt4 I don't get error
messages, neither when installing

PopplerAnnotation.o
build/temp.linux-i686-2.6/build/temp.linux-i686-2.6/sippopplerqt4PopplerAnnotationUtils.o
build/temp.linux-i686-2.6/build/temp.linux-i686-2.6/sippopplerqt4PopplerFormFieldChoice.o
build/temp.linux-i686-2.6/build/temp.linux-i686-2.6/sippopplerqt4PopplerFormFieldText.o
build/temp.linux-i686-2.6/build/temp.linux-i686-2.6/sippopplerqt4PopplerFormFieldButton.o
build/temp.linux-i686-2.6/build/temp.linux-i686-2.6/sippopplerqt4PopplerFormField.o
build/temp.linux-i686-2.6/build/temp.linux-i686-2.6/sippopplerqt4PopplerLinkJavaScript.o
build/temp.linux-i686-2.6/build/temp.linux-i686-2.6/sippopplerqt4PopplerLinkSound.o
build/temp.linux-i686-2.6/build/temp.linux-i686-2.6/sippopplerqt4PopplerLinkAction.o
build/temp.linux-i686-2.6/build/temp.linux-i686-2.6/sippopplerqt4PopplerLinkBrowse.o
build/temp.linux-i686-2.6/build/temp.linux-i686-2.6/sippopplerqt4PopplerLinkExecute.o
build/temp.linux-i686-2.6/build/temp.linux-i686-2.6/sippopplerqt4PopplerLinkGoto.o
build/temp.linux-i686-2.6/build/temp.linux-i686-2.6/sippopplerqt4PopplerLink.o
build/temp.linux-i686-2.6/build/temp.linux-i686-2.6/sippopplerqt4PopplerLinkDestination.o
build/temp.linux-i686-2.6/build/temp.linux-i686-2.6/sippopplerqt4Poppler.o
build/temp.linux-i686-2.6/build/temp.linux-i686-2.6/sippopplerqt4QSet0100PopplerDocumentRenderBackend.o
-lpoppler-qt4 -o build/lib.linux-i686-2.6/popplerqt4.so
user@ubuntu:~/4home/python-poppler-qt4-0.16.2$ sudo python setup.py
install --prefix /usr
running install
running build
running build_ext
running install_lib
copying build/lib.linux-i686-2.6/popplerqt4.so ->
/usr/lib/python2.6/site-packages
running install_egg_info
Removing
/usr/lib/python2.6/site-packages/python_poppler_qt4-0.16.2-py2.6.egg-info
Writing
/usr/lib/python2.6/site-packages/python_poppler_qt4-0.16.2-py2.6.egg-info

Wilbert Berendsen

unread,
Nov 22, 2011, 3:48:07 AM11/22/11
to fresc...@googlegroups.com
Op Mon, 21 Nov 2011 14:02:45 +0100
rosea grammostola <rosea.gr...@gmail.com> schreef:

> >>>> import popplerqt4

> > If that yields an ImportError, popplerqt4 is not installed
> > correctly.
> I get the import error. But when building popplerqt4 I don't get
> error messages, neither when installing

Strange!

Maybe your Python looks not in site-packages but in dist-packages.

You could try:

python setup.py install --install-layout=deb

in the python-poppler-qt4 install command

rosea grammostola

unread,
Nov 22, 2011, 6:50:52 AM11/22/11
to fresc...@googlegroups.com
That solved it, thanks!

\r

avocadohead

unread,
Apr 6, 2012, 1:28:08 AM4/6/12
to fresc...@googlegroups.com
I had a similar problem, (neither frescobaldi nor python console able to load the package), even though the default installation directory was in my PYTHONPATH and the library and egg info were where they were supposed to be.
However, I kept and compiled the sources on a NTFS partition, where Linux usually has permission handling problems. I got the package to work after compiling on my ext4 home partition.

avocadohead
Reply all
Reply to author
Forward
0 new messages