Hi Anthony,
Glad to see your response.
You requested my sample script.
import MySQLdb
try:
db = MySQLdb.connect(dbhost, dbuser, dbpass, dbase)
cursor = db.cursor()
sql = "INSERT INTO msc_md5file(clistnum, \
clistfilename, md5value) \
VALUES ('%s', '%s', '%s' ) ON DUPLICATE
KEY UPDATE md5value='%s';" % \
(123451, '/local/jack/myfile',
123sdfrethfjsgfbr)
cursor.execute(sql)
db.commit()
except:
db.rollback()
db.close()
When I run this python script file.py it works fine but when create a
standalone binary and execute it gives me Could not find the module MySQLdb.
The cxfreeze version i am using is 4.1 and also 4.2.3 both gives reports me
"Could not find the module MySQLdb"
Regards,
Jack
On Mon, Jan 23, 2012 at 8:35 PM, <
[email protected]> wrote:
> Send cx-freeze-users mailing list submissions to
> [email protected]
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.sourceforge.net/lists/listinfo/cx-freeze-users
> or, via email, send a message with subject or body 'help' to
> [email protected]
>
> You can reach the person managing the list at
> [email protected]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of cx-freeze-users digest..."
>
>
> Today's Topics:
>
> 1. Re: Missing modules: ? MySQLdb imported from __main__
> (Anthony Tuininga)
> 2. how to know what module/file are missing ? (Gr?gory Starck)
> 3. Re: how to know what module/file are missing ? (Anthony Tuininga)
> 4. Re: how to know what module/file are missing ? (Gr?gory Starck)
> 5. Re: how to know what module/file are missing ? (Michael Wood)
> 6. cx_Freeze website (Thomas Kluyver)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 4 Jan 2012 07:27:27 -0700
> From: Anthony Tuininga <[email protected]>
> Subject: Re: [cx-freeze-users] Missing modules: ? MySQLdb imported
> from __main__
> To: primary discussion list for use and development of cx_Freeze
> <[email protected]>
> Message-ID:
> <CAE1XR-64BiVMkZbNwjUwO41U4bGf8xYUCTaUOe=FmPan6i=b...@mail.gmail.com
> >
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi Jack,
>
> Can you provide me a simple script that demonstrates the problem and
> let me know what version of cx_Freeze you are using and on what
> platform? Thanks.
>
> Anthony
>
> On Wed, Jan 4, 2012 at 3:32 AM, jack jack <[email protected]> wrote:
> > Hi Anthony,
> >
> > With continuation of me previous email, Could you please help me how to
> fix
> > this with cxfreeze. cxfreeze not able to include MySQLdb module hence
> during
> > runtime it fails.
> >
> > Regards,
> > Jack
> >
> >
> >
> >
> > On Sat, Dec 10, 2011 at 10:12 AM, jack jack <[email protected]> wrote:
> >>
> >> Hi Anthony,
> >>
> >> I don't know if this issue has been addressed, as i don't see mail
> >> notification on this.
> >>
> >> In continuation of below email, When i create the executable in Linux
> and
> >> in Windows and when i execute the binary i got following error
> >>
> >> ImportError: No module named MySQLdb
> >>
> >> My script does some database operation.
> >>
> >> So i wanted to know why this error message, is it due to below missing
> >> module while creating binary hence it has not include MySQLdb module,
> if not
> >> then its very bad or i am missing something here. How to resolve this
> please
> >> help
> >>
> >> Regards,
> >> Jack.
> >>
> >>
> >> On Thu, Dec 1, 2011 at 2:25 PM, jack jack <[email protected]> wrote:
> >>>
> >>> Dear All,
> >>>
> >>> This is urgent for us!!
> >>>
> >>> I building a python binary, but after building i am getting message
> >>>
> >>> Missing modules:
> >>> ? MySQLdb imported from __main__
> >>> ? _md5 imported from hashlib
> >>> ? _sha imported from hashlib
> >>> ? _sha256 imported from hashlib
> >>> ? _sha512 imported from hashlib
> >>> ? simplejson._speedups imported from simplejson.scanner
> >>>
> >>>
> >>> I don't know what i am missing here, module MySQLdb is present when i
> >>> open python prompt and import MySQLdb it works fine then why i am
> getting
> >>> this error message.
> >>> am i missing something here.
> >>>
> >>> Appreciate your quick response.
> >>>
> >>> Regards,
> >>> Nilesh J
> >>>
> >>
> >
> >
> >
> ------------------------------------------------------------------------------
> > Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
> > infrastructure or vast IT resources to deliver seamless, secure access to
> > virtual desktops. With this all-in-one solution, easily deploy virtual
> > desktops for less than the cost of PCs and save 60% on VDI infrastructure
> > costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
> > _______________________________________________
> > cx-freeze-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/cx-freeze-users
> >
>
>
>
> ------------------------------
>
> Message: 2
> Date: Wed, 18 Jan 2012 17:04:39 +0100
> From: Gr?gory Starck <[email protected]>
> Subject: [cx-freeze-users] how to know what module/file are missing ?
> To: [email protected]
> Message-ID:
> <cam8fmganuvcy6by7jddqudvkga6rr6bp6ayb7gzu-rhv-hs...@mail.gmail.com
> >
> Content-Type: text/plain; charset="utf-8"
>
> Hi,
>
> I've freezed a pyqt based application (personal application).
> On my dev machine it's all good. (my builddir is filled up with : a exe
> ofcourse and some few dlls/pyd & a library.zip).
>
> but if I try under a totally fresh winXP I'm directly getting a hard error
> :
> "This application could'nt start because its configuration is incorrect.
> Reinstall the application might solve this problem"
>
> then if I install python on this winxp then the generated exe file then
> works ok. If i uninstall python from that winxp then the exe file raises
> again the previous error. etc.. (what's funny is that if I install python
> and then rename (to whatever) its installation directory then the exe still
> works)
>
> problem is that I don't know how to know what module/dlls/.. could be
> missing from python thus..
>
> anyone has an idea ??
>
> thx & regards,
>
> GST.
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
> ------------------------------
>
> Message: 3
> Date: Wed, 18 Jan 2012 09:49:38 -0700
> From: Anthony Tuininga <[email protected]>
> Subject: Re: [cx-freeze-users] how to know what module/file are
> missing ?
> To: primary discussion list for use and development of cx_Freeze
> <[email protected]>
> Message-ID:
> <cae1xr-7-eyb_-nwn2phoqckgr1jr-ezbxltowbfopwqn+kn...@mail.gmail.com
> >
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi,
>
> That error is likely due to the fact that you don't have the Visual
> Studio redistributable installed on the target machine. I believe the
> one you want is for 2008. I am not on a Windows machine at the moment
> (I don't use one personally) but you should be able to find it and
> download it easily enough. There are ways to have that included with
> your executable but I don't have those instructions at hand. You can
> easily search for them, though -- look for "private assembly".
>
> The error message which says nothing at all you can thank Microsoft
> for! Take a look in the event log, though. That should confirm my
> suspicions as there it *does* give a bit more information on what the
> problem actually is!
>
> Anthony
>
> 2012/1/18 Gr?gory Starck <[email protected]>:
> > Hi,
> >
> > I've freezed a pyqt based application (personal?application).
> > On my dev machine it's all good. (my builddir is filled up with ?: a exe
> > ofcourse and some few dlls/pyd & a library.zip).
> >
> > but if I try under a totally fresh winXP I'm directly getting a hard
> error :
> > ?"This application could'nt start because its configuration is incorrect.
> > Reinstall the application might solve this problem"
> >
> > then if I install python on this winxp then the generated exe file then
> > works ok. ?If i uninstall python from that winxp then the exe file raises
> > again the previous error. etc.. ?(what's funny is that if I install
> python
> > and then rename (to whatever) its installation directory then the exe
> still
> > works)
> >
> > problem is that I don't know how to know what module/dlls/.. ?could be
> > missing from python thus..
> >
> > anyone has an idea ??
> >
> > thx & regards,
> >
> > GST.
> >
> >
> ------------------------------------------------------------------------------
> > Keep Your Developer Skills Current with LearnDevNow!
> > The most comprehensive online learning library for Microsoft developers
> > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> > Metro Style Apps, more. Free future releases when you subscribe now!
> > http://p.sf.net/sfu/learndevnow-d2d
> > _______________________________________________
> > cx-freeze-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/cx-freeze-users
> >
>
>
>
> ------------------------------
>
> Message: 4
> Date: Wed, 18 Jan 2012 18:22:06 +0100
> From: Gr?gory Starck <[email protected]>
> Subject: Re: [cx-freeze-users] how to know what module/file are
> missing ?
> To: primary discussion list for use and development of cx_Freeze
> <[email protected]>
> Message-ID:
> <cam8fmgdc4crcg9rn_xiejb6p6uztlmeice7+xmv0mhcudmu...@mail.gmail.com
> >
> Content-Type: text/plain; charset="utf-8"
>
> Le 18 janvier 2012 17:49, Anthony Tuininga <[email protected]> a
> ?crit :
>
> > Hi,
> >
> > That error is likely due to the fact that you don't have the Visual
> > Studio redistributable installed on the target machine. I believe the
> > one you want is for 2008.
> >
> > Anthony
> >
> >
> Hi,
>
> very good that was it ! :) :)
>
> and effectively having an eye within eventviewer of windows shows me some
> related logs. though they are also quite cryptic, like :
> """Generate Activation Context failed for "my exe application path".
> Referenced error message is : Operation successfull"""
>
> I've so installed "Microsoft Visual C++ 2008 Redistributable Package
> (x86)" and
> with that the exe runs ok without python installed on the target machine.
> So now I could more precisely look what exact files my exe needs from that
> package..
>
> Though, if you would have some advice on how to do that cleanly with
> cx_freeze then I'm all open :)
>
> but anyway already thanks for the info & tip.
>
> regards,
>
> GS.
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
> ------------------------------
>
> Message: 5
> Date: Thu, 19 Jan 2012 10:40:38 +0200
> From: Michael Wood <[email protected]>
> Subject: Re: [cx-freeze-users] how to know what module/file are
> missing ?
> To: primary discussion list for use and development of cx_Freeze
> <[email protected]>
> Message-ID:
> <CAP6d-HUnuru1GQz8+DfLwbRfSm2vPkhXiYGo24XnAp=k+ql...@mail.gmail.com
> >
> Content-Type: text/plain; charset=ISO-8859-1
>
> 2012/1/18 Gr?gory Starck <[email protected]>:
> > Le 18 janvier 2012 17:49, Anthony Tuininga <[email protected]>
> a
> > ?crit :
> >>
> >> Hi,
> >>
> >> That error is likely due to the fact that you don't have the Visual
> >> Studio redistributable installed on the target machine. I believe the
> >> one you want is for 2008.
> >>
> >> Anthony
> >
> > Hi,
> >
> > very good that was it ! ?:) :)
> >
> > and effectively having an eye within eventviewer of windows ?shows me
> some
> > related logs. though they are also quite cryptic, like :
> > """Generate Activation Context failed for "my exe application path".
> > Referenced error message is : Operation successfull"""
>
> You could try using "dependency walker"
> (http://www.dependencywalker.com) on the exe and all DLLs/pyd files to
> find the missing things. You would have found the name of the DLL
> that was missing. There are false positives, though. One one of my
> machines it normally finds "IESHIMS.DLL" and "WER.DLL" missing, but it
> seems that they are not actually necessary.
>
> > I've so installed "Microsoft Visual C++ 2008 Redistributable Package
> > (x86)"?and with that the exe runs ok without python installed on the
> target
> > machine.
> > So now I could more precisely look what exact files my exe needs from
> that
> > package..
>
> It would be better to make the MS VC++ redistributable package a
> dependency of your app. e.g. if you use WiX to make an MSI package
> for your app you can tell it to depend on the VC++ redistributable
> package. This way Windows Update can install security fixes for the
> VC++ redist. package if necessary.
>
> --
> Michael Wood <[email protected]>
>
>
>
> ------------------------------
>
> Message: 6
> Date: Sat, 21 Jan 2012 19:20:03 +0000
> From: Thomas Kluyver <[email protected]>
> Subject: [cx-freeze-users] cx_Freeze website
> To: primary discussion list for use and development of cx_Freeze
> <[email protected]>
> Message-ID:
> <CAOvn4qj=it139O=mp9oap0useudrrzbqsozfi_j-8emrgh2...@mail.gmail.com
> >
> Content-Type: text/plain; charset="iso-8859-1"
>
> I spent a few minutes tweaking the layout of the website. I've put the
> documentation into the same container as the front page, and removed the
> long list of links to older versions on the front page.
>
> I attach a patch against the web/ folder in subversion.
>
> Thanks,
> Thomas
> -------------- next part --------------
> An HTML attachment was scrubbed...
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: cx_freeze-web.patch
> Type: application/octet-stream
> Size: 33014 bytes
> Desc: not available
>
> ------------------------------
>
>
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
>
> ------------------------------
>
> _______________________________________________
> cx-freeze-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/cx-freeze-users
>
>
> End of cx-freeze-users Digest, Vol 60, Issue 2
> **********************************************
>
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
cx-freeze-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cx-freeze-users