py2exe, PyQT, QtWebKit and jpeg problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Carbonimax

    py2exe, PyQT, QtWebKit and jpeg problem

    hello

    I have a problem with py2exe and QtWebKit :
    I make a program with a QtWebKit view.
    If I launch the .py directly, all images (jpg, png) are displayed but
    if I compile it with py2exe I have only png images. No jpg !
    No error message, nothing.

    Have you a solution ? Thank you.
  • Phil Thompson

    #2
    Re: py2exe, PyQT, QtWebKit and jpeg problem

    On Fri, 20 Jun 2008 08:04:57 -0700 (PDT), Carbonimax <carbonimax@gma il.com>
    wrote:
    hello
    >
    I have a problem with py2exe and QtWebKit :
    I make a program with a QtWebKit view.
    If I launch the .py directly, all images (jpg, png) are displayed but
    if I compile it with py2exe I have only png images. No jpg !
    No error message, nothing.
    >
    Have you a solution ? Thank you.
    At a guess, the JPEG support is implemented as a Qt plugin which you are
    not including.

    Phil

    Comment

    • David Boddie

      #3
      Re: py2exe, PyQT, QtWebKit and jpeg problem

      On Friday 20 June 2008 17:24, Phil Thompson wrote:
      On Fri, 20 Jun 2008 08:04:57 -0700 (PDT), Carbonimax
      <carbonimax@gma il.comwrote:
      >I have a problem with py2exe and QtWebKit :
      >I make a program with a QtWebKit view.
      >If I launch the .py directly, all images (jpg, png) are displayed but
      >if I compile it with py2exe I have only png images. No jpg !
      >No error message, nothing.
      >>
      >Have you a solution ? Thank you.
      >
      At a guess, the JPEG support is implemented as a Qt plugin which you are
      not including.
      Yes, that would appear to the be most obvious cause. See here for another
      report about this:



      David

      Comment

      • Carbonimax

        #4
        Re: py2exe, PyQT, QtWebKit and jpeg problem

        On Jun 21, 12:21 am, David Boddie <da...@boddie.o rg.ukwrote:
        On Friday 20 June 2008 17:24, Phil Thompson wrote:
        >
        On Fri, 20 Jun 2008 08:04:57 -0700 (PDT),Carbonima x
        <carboni...@gma il.comwrote:
        I have a problem with py2exe and QtWebKit :
        I make a program with a QtWebKit view.
        If I launch the .py directly, all images (jpg, png) are displayed but
        if I compile it with py2exe I have only png images. No jpg !
        No error message, nothing.
        >
        Have you a solution ? Thank you.
        >
        At a guess, the JPEG support is implemented as a Qt plugin which you are
        not including.
        >
        Yes, that would appear to the be most obvious cause. See here for another
        report about this:
        >

        >
        David
        How can I do that ?
        If I copy the dll in the dist directory, and I use QLibrary() and
        load(),
        it does work in the .py but it doesn't in .exe made with py2exe

        my code :
        dll = QLibrary(path_t o_dll)
        res = dll.load()

        res == true in the .py
        res == false in the .exe

        :-/

        Comment

        • Carbonimax

          #5
          Re: py2exe, PyQT, QtWebKit and jpeg problem

          On Jun 21, 12:21 am, David Boddie <da...@boddie.o rg.ukwrote:
          On Friday 20 June 2008 17:24, Phil Thompson wrote:
          >
          On Fri, 20 Jun 2008 08:04:57 -0700 (PDT), Carbonimax
          <carboni...@gma il.comwrote:
          I have a problem with py2exe and QtWebKit :
          I make a program with a QtWebKit view.
          If I launch the .py directly, all images (jpg, png) are displayed but
          if I compile it with py2exe I have only png images. No jpg !
          No error message, nothing.
          >
          Have you a solution ? Thank you.
          >
          At a guess, the JPEG support is implemented as a Qt plugin which you are
          not including.
          >
          Yes, that would appear to the be most obvious cause. See here for another
          report about this:
          >

          >
          David
          How can I do that ?
          If I copy the dll in the dist directory, and I use QPluginLoader() and
          load(),
          it does work in the .py but it doesn't in .exe made with py2exe

          my code :
          dll = QPluginLoader(p ath_to_dll)
          res = dll.load()

          res == true in the .py
          res == false in the .exe

          :-/

          Comment

          • David Boddie

            #6
            Re: py2exe, PyQT, QtWebKit and jpeg problem

            On Monday 23 June 2008 15:02, Carbonimax wrote:
            If I copy the dll in the dist directory, and I use QPluginLoader() and
            load(),
            it does work in the .py but it doesn't in .exe made with py2exe
            >
            my code :
            dll = QPluginLoader(p ath_to_dll)
            res = dll.load()
            >
            res == true in the .py
            res == false in the .exe
            >
            :-/
            Maybe py2exe builds executables that can't load DLLs in this way.
            In any case, it might be worth asking about this on the PyQt
            mailing list



            or on the py2exe mailing list

            A distutils extension to create standalone windows programs from python scripts.


            where there may well be people who have solved this problem
            independently.

            David

            Comment

            • yang.zengguang@gmail.com

              #7
              Re: py2exe, PyQT, QtWebKit and jpeg problem

              On 6ÔÂ20ÈÕ, ÏÂÎç11ʱ04·Ö, Carbonimax <carboni...@gma il.comwrote:
              hello
              >
              I have a problem with py2exe and QtWebKit :
              I make a program with a QtWebKit view.
              If I launch the .py directly, all images (jpg, png) are displayed but
              if I compile it with py2exe I have only png images. No jpg !
              No error message, nothing.
              >
              Have you a solution ? Thank you.

              I have the same problem with you. I find a way to fix it:
              1. Copy Qt plugins to the directory: $YOUR_DIST_PATH/PyQt4/plugins;
              2. Copy qt.conf to youar dist directory;
              3. Edit qt.conf, change Prefix to $YOUR_DIST_PATH/PyQt4

              Orit

              Comment

              • Carbonimax

                #8
                Re: py2exe, PyQT, QtWebKit and jpeg problem

                On Jun 29, 4:14 pm, yang.zenggu...@ gmail.com wrote:
                On 6ÔÂ20ÈÕ, ÏÂÎç11ʱ04·Ö, Carbonimax <carboni...@gma il.comwrote:
                >
                hello
                >
                I have a problem with py2exe and QtWebKit :
                I make a program with a QtWebKit view.
                If I launch the .py directly, all images (jpg, png) are displayed but
                if I compile it with py2exe I have only png images. No jpg !
                No error message, nothing.
                >
                Have you a solution ? Thank you.
                >
                I have the same problem with you. I find a way to fix it:
                1. Copy Qt plugins to the directory: $YOUR_DIST_PATH/PyQt4/plugins;
                2. Copy qt.conf to youar dist directory;
                3. Edit qt.conf, change Prefix to $YOUR_DIST_PATH/PyQt4
                >
                Orit
                It work, thank you :)

                Comment

                • Carbonimax

                  #9
                  Re: py2exe, PyQT, QtWebKit and jpeg problem

                  On Jun 29, 4:14 pm, yang.zenggu...@ gmail.com wrote:
                  On 6ÔÂ20ÈÕ, ÏÂÎç11ʱ04·Ö, Carbonimax <carboni...@gma il.comwrote:
                  >
                  hello
                  >
                  I have a problem with py2exe and QtWebKit :
                  I make a program with a QtWebKit view.
                  If I launch the .py directly, all images (jpg, png) are displayed but
                  if I compile it with py2exe I have only png images. No jpg !
                  No error message, nothing.
                  >
                  Have you a solution ? Thank you.
                  >
                  I have the same problem with you. I find a way to fix it:
                  1. Copy Qt plugins to the directory: $YOUR_DIST_PATH/PyQt4/plugins;
                  2. Copy qt.conf to youar dist directory;
                  3. Edit qt.conf, change Prefix to $YOUR_DIST_PATH/PyQt4
                  >
                  Orit
                  It works, thank you :-)

                  Comment

                  Working...