Hi,

I am not familiar with Selenium. However, other packages have similar
issues where they *assume* that the module in question is found in the
filesystem and that the files the module is looking for are found
within itself. Of course when the module is inside a zip file that
doesn't work. So, take a look at the package in question at the lines
where the error is occurring and see if there is any way to fix it to
work -- then suggest a patch to the package owner. If that doesn't
work for you, you might also be able to deliberately exclude that
package from the zip file and instead put it (along with the file it
is looking for) directly in the filesystem using the include_files
directive. Hope that helps you out.

Anthony

On Wed, Oct 19, 2011 at 12:47 PM, Danny Nguyen <[email protected]> wrote:
> Python: 2.7
> OS: Windows
>
> I'm trying to package a script that uses Selenium (Webdriver).  Selenium
> asks Firefox to install an extension called webdriver.xpi .  However this
> file is not copied to the library.zip during build_exe .  As a result, when
> I run my program, I get the following errors:
>
> C:\Documents and Settings\nguyda2\My Documents\My Dropbox\Home\eclipse
> workspace
> \checkSite\build\checkSite_0_
> 1>checkSite.exe
> Traceback (most recent call last):
>   File "C:\Documents and Settings\nguyda2\My Documents\My
> Dropbox\Home\python\lib\site-packages\cx_Freeze\initscripts\Console.py",
> line 27, in <module>
>     exec code in m.__dict__
>   File "checkSite.py", line 239, in <module>
>   File "checkSite.py", line 123, in checkSite
>   File "checkSite.py", line 156, in checkSitesafe
>   File "C:\Documents and Settings\nguyda2\My Documents\My
> Dropbox\Home\python\lib\site-packages\selenium-2.8.1-py2.7.egg\selenium\webdriver\firefox\webdriver.py",
> line 46, in __init__
>     self.binary, timeout),
>   File "C:\Documents and Settings\nguyda2\My Documents\My
> Dropbox\Home\python\lib\site-packages\selenium-2.8.1-py2.7.egg\selenium\webdriver\firefox\extension_connection.py",
> line 44, in __init__
>     self.profile.add_extension()
>   File "C:\Documents and Settings\nguyda2\My Documents\My
> Dropbox\Home\python\lib\site-packages\selenium-2.8.1-py2.7.egg\selenium\webdriver\firefox\firefox_profile.py",
> line 115, in add_extension
>     self._install_extension(extension)
>   File "C:\Documents and Settings\nguyda2\My Documents\My
> Dropbox\Home\python\lib\site-packages\selenium-2.8.1-py2.7.egg\selenium\webdriver\firefox\firefox_profile.py",
> line 205, in _install_extension
>
>     xpi = zipfile.ZipFile(extension)
>   File "C:\Documents and Settings\nguyda2\My Documents\My
> Dropbox\Home\python\lib\zipfile.py", line 699, in __init__
>     self.fp = open(file, modeDict[mode])
> IOError: [Errno 2] No such file or directory: 'C:\\Documents and
> Settings\\nguyda2\\My Documents\\My Dropbox\\Home\\eclipse
> workspace\\checkSite\\build\\checkSite_0_1\\library.zip\\selenium\\webdriver
> \\firefox\\webdriver.xpi'
>
> I've tried manually placing xpi file into the appropriate place in the zip
> file without any luck.
>
> I appreciate any help I can get on this.
>
> Thanks,
> Danny
> ------------------------------------------------------------------------------
> The demand for IT networking professionals continues to grow, and the
> demand for specialized networking skills is growing even more rapidly.
> Take a complimentary Learning@Ciosco Self-Assessment and learn
> about Cisco certifications, training, and career opportunities.
> http://p.sf.net/sfu/cisco-dev2dev
> _______________________________________________
> cx-freeze-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/cx-freeze-users
>
>

------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Ciosco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
cx-freeze-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cx-freeze-users

Reply via email to