ArchiveOrangemail archive

General discussion list for the Python programming language


python-list.python.org
(List home) (Recent threads) (100 other Python lists)

Subscription Options

  • RSS or Atom: Read-only subscription using a browser or aggregator. This is the recommended way if you don't need to send messages to the list. You can learn more about feed syndication and clients here.
  • Conventional: All messages are delivered to your mail address, and you can reply. To subscribe, send an email to the list's subscribe address with "subscribe" in the subject line, or visit the list's homepage here.
  • High traffic list: 30+ messages per day
  • This list contains about 673,992 messages, beginning Feb 1999
  • 74 messages added yesterday
Report the Spam
This button sends a spam report to the moderator. Please use it sparingly. For other removal requests, read this.
Are you sure? yes no

Py2exe and Module Error...

Ad
vincehofmeister at gmail.com 1224714879Wed, 22 Oct 2008 22:34:39 +0000 (UTC)
Hey everyone:

I am using py2exe and everything is working fine except one module,
ClientCookie, found here:

http://wwwsearch.sourceforge.net/ClientCookie...

Keeps coming up as not found no matter what I do. I have tried all
these combinations from the command line:

python run.py py2exe - Results in "following modules appear to be
missing" [ClientCookie]

python run.py py2exe -p ClientCookie - Results in "No module named
ClientCookie"

python run.py py2exe -i ClientCookie - Results in "No module named
ClientCookie"


Ok, so that wasn't the problem I guess so now I try two different
combinations of the run.py file... they look like this:

#!/usr/bin/env python

from distutils.core import setup
import py2exe

#setup(windows=['C:\\exe\\new_pound.py']);
setup(windows=[{"script" : "C:\\exe\\pos_final2.py"}],
options={"py2exe" : {"includes" : ["sip"]}})

^this just gives me the standard "following modules appear to be
missing" [ClientCookie]



#!/usr/bin/env python

from distutils.core import setup
import py2exe

#setup(windows=['C:\\exe\\new_pound.py']);
setup(windows=[{"script" : "C:\\exe\\pos_final2.py"}],
options={"py2exe" : {"includes" : ["sip", "ClientCookie"]}})

^this gives the error "No module named ClientCookie


Ok so I am really in a crunch and have no idea what to do. Any help
would be GREATLY appreciated.

Vince

P.S. I know ClientCookie is a branch of mechanize, but I don't
understand how it runs fine on my machine using import ClientCookie
and then when using py2exe it doesn't find it. I have tried from
mechanize import ClientCookie and many alternatives but none of those
work on importing the ClientCookie module normally without py2exe.
Gabriel Genellina 1224732802Thu, 23 Oct 2008 03:33:22 +0000 (UTC)
En Wed, 22 Oct 2008 20:34:39 -0200,  escribi?:

> I am using py2exe and everything is working fine except one module,
> ClientCookie, found here:
>
> http://wwwsearch.sourceforge.net/ClientCookie...
>
> Keeps coming up as not found no matter what I do. I have tried all
> these combinations from the command line:Add `import ClientCookie` to your setup.py (to make sure you actually  
*can* import it in your development environment).
Also declare it as a required *package* (not module):

setup(windows=["C:\\exe\\pos_final2.py"],
       ...
       options={'py2exe': {
         'packages': ['ClientCookie',]
         })
vincehofmeister at gmail.com 1224799361Thu, 23 Oct 2008 22:02:41 +0000 (UTC)
On Oct 22, 8:33 pm, "Gabriel Genellina" 
wrote:
> En Wed, 22 Oct 2008 20:34:39 -0200,  escribi?:
>
> > I am using py2exe and everything is working fine except one module,
> > ClientCookie, found here:
>
> >http://wwwsearch.sourceforge.net/ClientCookie...
>
> > Keeps coming up as not found no matter what I do. I have tried all
> > these combinations from the command line:
>
> Add `import ClientCookie` to your setup.py (to make sure you actually
> *can* import it in your development environment).
> Also declare it as a required *package* (not module):
>
> setup(windows=["C:\\exe\\pos_final2.py"],
>        ...
>        options={'py2exe': {
>          'packages': ['ClientCookie',]
>          })
>
> --
> Gabriel GenellinaOk, thank you for your reply Gabriel. I did as you said, including
adding 'import ClientCookie' to setup.py and that worked fine when
running the script it found it. However, when actually running it
through py2exe after adding the package as you have said, it still
says 'No module named ClientCookie'

Any help would be greatly appreciated.

Vince
Gabriel Genellina 1224808447Fri, 24 Oct 2008 00:34:07 +0000 (UTC)
En Thu, 23 Oct 2008 20:02:41 -0200,  escribi?:
> On Oct 22, 8:33 pm, "Gabriel Genellina" 
> wrote:
>> En Wed, 22 Oct 2008 20:34:39 -0200,   
>> escribi?:
>>
>> > I am using py2exe and everything is working fine except one module,
>> > ClientCookie, found here:
>>
>> >http://wwwsearch.sourceforge.net/ClientCookie...
>>
>> > Keeps coming up as not found no matter what I do. I have tried all
>> > these combinations from the command line:
> Ok, thank you for your reply Gabriel. I did as you said, including
> adding 'import ClientCookie' to setup.py and that worked fine when
> running the script it found it. However, when actually running it
> through py2exe after adding the package as you have said, it still
> says 'No module named ClientCookie'
>
> Any help would be greatly appreciated.Sorry, I can not give further general advice. This seems to be something  
specific to ClientCookie - try any forum devoted to the package, or ask  
the author directly.
Mike Driscoll 1224862098Fri, 24 Oct 2008 15:28:18 +0000 (UTC)
On Oct 23, 5:02?pm, vincehofmeis... at gmail.com wrote:
> On Oct 22, 8:33 pm, "Gabriel Genellina" 
> wrote:
>
>
>
> > En Wed, 22 Oct 2008 20:34:39 -0200,  escribi?:
>
> > > I am using py2exe and everything is working fine except one module,
> > > ClientCookie, found here:
>
> > >http://wwwsearch.sourceforge.net/ClientCookie...
>
> > > Keeps coming up as not found no matter what I do. I have tried all
> > > these combinations from the command line:
>
> > Add `import ClientCookie` to your setup.py (to make sure you actually
> > *can* import it in your development environment).
> > Also declare it as a required *package* (not module):
>
> > setup(windows=["C:\\exe\\pos_final2.py"],
> > ? ? ? ?...
> > ? ? ? ?options={'py2exe': {
> > ? ? ? ? ?'packages': ['ClientCookie',]
> > ? ? ? ? ?})
>
> > --
> > Gabriel Genellina
>
> Ok, thank you for your reply Gabriel. I did as you said, including
> adding 'import ClientCookie' to setup.py and that worked fine when
> running the script it found it. However, when actually running it
> through py2exe after adding the package as you have said, it still
> says 'No module named ClientCookie'
>
> Any help would be greatly appreciated.
>
> VinceTry asking at the py2exe mailing list as well. They can probably give
you some pointers.

Mike
Home | About | Privacy