Menu

#26 Problem with libpoppler...

1.0
closed
nobody
None
2015-08-31
2015-08-28
alfazaz
No

Hello !

I have juste installed your last pygi and I have a problem when running a python program (traduction from french to english in the text) :


Traceback (most recent call last):
File "C:\Users\YA\Desktop\2_Traitement\Traitement.py", line 284, in on_drawingarea_draw
document = Poppler.Document.new_from_file (path2url('Sources/PdfVuParCandidat/' + str(numerodossier) + '.pdf'), None)
GLib.Error: g-invoke-error-quark: Could not locate poppler_document_new_from_file: 'libpoppler-53.dll': Le module spécifié est introuvable. (1) [Specified module not found]
** (python.exe:1068): WARNING **: Failed to load shared library 'libpoppler-glib-8.dll' referenced by the typelib: 'libpoppler-glib-8.dll': Le module spcifi est introuvable. [Specified module not found]

** (python.exe:1068): WARNING **: Failed to load shared library 'libpoppler-53.dll' referenced by the typelib: 'libpoppler-53.dll': Le module spcifi est introuvable. [Specified module not found]


Is it a problem with pygi or do I need to install another thing (what ?) to make poppler working ?

I have installed poppler from pygi of course...

Thanks !
Alfazaz

Discussion

1 2 > >> (Page 1 of 2)
  • tumagonx

    tumagonx - 2015-08-28

    Thanks, this an issue with rev21, at the moment please also select pango when selecting poppler in the package list. I will fix he issue in rev22

     
  • tumagonx

    tumagonx - 2015-08-28

    Correction, It's not dependency issue. I can confirm with my simple test that it works out of box. Could you give me your test case snippet?

     
  • alfazaz

    alfazaz - 2015-08-28

    I tried with pango selected and I have still the problem. I'm under pyzo 32 bit distribution on windows 7. My program is big... I write a minimal test case and I post it here when it is ready.

     
  • alfazaz

    alfazaz - 2015-08-28

    My minimal example works so I made a mistake in my big code (the surprise is that the big code works on linux but not on windows...).
    You can close this thread. It seems to be no mistake from pygi here. Sorry !

     
  • tumagonx

    tumagonx - 2015-08-28

    Such issue sometime happen when other third party libraries involved and somehow the dll didn't called in correct manner midway. Please re-open this if it's incompatibility with third party libraries.

     
  • tumagonx

    tumagonx - 2015-08-28
    • status: open --> closed
     
  • alfazaz

    alfazaz - 2015-08-28

    All right...

    If I call a Poppler command at the beginning of the code, after importing the module, everything else works... Your remark seems to be exact but it will be very tricky to solve :-(.
    I let this closed.

    Thanks for all.

     
  • alfazaz

    alfazaz - 2015-08-29

    If you have time, you can look at this minimal example (files joined, put them into same directory) :

    • Without the line "import numpy as np" commented, no problem on python64bit on linux and on python32bit on windows.
    • With the line 'import numpy as np" not commented, problem only on python32bit on windows... Same errors like above...

    ???? Do you know where to post this bug if here is a wrong place ? Thanks !

     

    Last edit: alfazaz 2015-08-29
  • alfazaz

    alfazaz - 2015-08-29

    Oulalala... What about this (on Pyzo32bit/windows ; no problem on linux) :

    • If I run this only two lines script (really minimal example) :
      import numpy as np
      from gi.repository import Gtk

    it gives these errors :
    Traceback (most recent call last):
    File "E:\tmp\Essai.py", line 2, in <module>
    from gi.repository import Gtk
    File "C:\pyzo2015a\lib\site-packages\gi__init__.py", line 42, in <module>
    from . import _gi
    ImportError: DLL load failed: Le module spécifié est introuvable. [Specified module not found]</module></module>

    • And if I run this two lines script (permutation of lines only) :
      from gi.repository import Gtk
      import numpy as np

    it gives no error... Exactly same thing with Poppler of course.

    What's the Hell ? Is it related with my precedent post ? [I don't no if I need to reopen the ticket and where it is possible to do it on this site...].

     
  • alfazaz

    alfazaz - 2015-08-29

    Another try in python3.4/spyder/windows/32bit... With only this line :
    from gi.repository import Gtk


    Traceback (most recent call last):

    File "<ipython-input-1-cb5362bb191d>", line 1, in <module>
    runfile('E:/tmp/Essai.py', wdir='E:/tmp')</module></ipython-input-1-cb5362bb191d>

    File "C:\Python34\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 585, in runfile
    execfile(filename, namespace)

    File "C:\Python34\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 48, in execfile
    exec(compile(open(filename, 'rb').read(), filename, 'exec'), namespace)

    File "E:/tmp/Essai.py", line 2, in <module>
    from gi.repository import Gtk</module>

    File "C:\Python34\lib\site-packages\gi__init__.py", line 42, in <module>
    from . import _gi</module>

    ImportError: DLL load failed: Le module spécifié est introuvable.


    ????? (I must make such a big mistake that I can't see it ???). :-(

     
  • alfazaz

    alfazaz - 2015-08-29

    One good news (!!!) : everything works in Idle...

    So, the mystery is the following : why is there problems with IEP(pyzo), spyder and commandline (python Essai.py) ?

    :-|

     

    Last edit: alfazaz 2015-08-29
  • tumagonx

    tumagonx - 2015-08-29

    Well, despite that you try to simplify the test code. The environment you chose (pyzo/spyder) is a huge bundle already, I bet there are already dozens of module (dll) imports just for startup... But I'm aware about that (scientific python) issue, and as you said it's to complicated to pinpoint considering dozens of dll are on pygi side too. It shound be okay with numpy I have been use pygi+numpy for mypaint all the time.

    Is there a link of smaller download (<100mb) of windows installer?

     
  • alfazaz

    alfazaz - 2015-08-29

    Here is a really simple test case :

    • Create a file Essai.py with these two lines :
      import numpy as np
      from gi.repository import Gtk

    • Execute it in DOS command prompt with :
      python Essai.py

    For me, this leads to :
    C:\Users\YA\Desktop\tmp>python Essai.py
    Traceback (most recent call last):
    File "Essai.py", line 2, in <module>
    from gi.repository import Gtk
    File "C:\Python34\lib\site-packages\gi__init__.py", line 42, in
    from . import _gi
    ImportError: DLL load failed: Le module spécifié est introuvable.</module>

    And for you ? (There is no spyder, pyzo and co here)

     
  • alfazaz

    alfazaz - 2015-08-29

    Your case works but why my little example with only two lines doesn't work (my precedent message) ? What is your python installation ?

     
  • tumagonx

    tumagonx - 2015-08-29

    I just try reproduce your example with

    • Official python 3.4 clean install
    • Official Numpy 1.9.2
    • PyGI (GTK+Poppler)

    It does works for me

     
  • alfazaz

    alfazaz - 2015-08-29

    All right... So I'm going to make a clean install like yours (with python 32bit on windows 7 64bit for me) and re-test...

     
  • tumagonx

    tumagonx - 2015-08-29

    When we have packages incompatibility, we should try it bit by bit. The issue certainly exist but we need to filter it by starting it clean first.

     
  • alfazaz

    alfazaz - 2015-08-29

    Sure ! So I desinstall all python and restart from scratch (it's not as easy as on linux :-( ).

     
  • alfazaz

    alfazaz - 2015-08-29

    So here are all of my steps :

    1/ Removed all python and reboot.

    2/ Got python-3.4.3 32 bits msi installer from official site and installed.

    3/ Got numpy-1.9.2-win32-superpack-python3.4.exe from official site and installed.

    4/ Got pygi-aio-3.14.0_rev21-setup.exe and installed with Gtk+ and Poppler ticked.

    5/ Opened DOS Command Prompt and go to directory where is Essai.py which is the file with only these two lines :
    import numpy as np
    from gi.repository import Gtk

    6/ Typed at the prompt : python Essai.py and.... again :-(
    Traceback (most recent call last):
    File "Essai.py", line 2, in <module>
    from gi.repository import Gtk
    File "C:\Python34\lib\site-packages\gi__init__.py", line 42, in <module>
    from . import _gi
    ImportError: DLL load failed: Le module spécifié est introuvable.</module></module>

    I'm in a fog here...

    Alfazaz from the french night...

    PS : if you remove "import numpy as np", no error and, if you permute the two lines ("import numpy as np" after "from gi.repository import GtK") no error too... 8-|

     

    Last edit: alfazaz 2015-08-29
  • tumagonx

    tumagonx - 2015-08-29

    How about try it with depends (dependency walker), is there any suspicious thing?

     
  • alfazaz

    alfazaz - 2015-08-29

    What's this ? Can you give me help lines to try this ? (I'm usually a linux user and not a windows user...).

     
  • alfazaz

    alfazaz - 2015-08-29

    Euh... I installed it but I have to load what module ?

    I have the precedent script Essai.py but it's not an executable...

     
  • tumagonx

    tumagonx - 2015-08-29

    open python.exe
    press F7
    pass full path of Essay.py as arguments

     

    Last edit: tumagonx 2015-08-29
1 2 > >> (Page 1 of 2)

Log in to post a comment.

MongoDB Logo MongoDB