Python - Trouble in building executable

0
0

I’m a python programmer and I’m trying to build an executable binary to distribute my software to my clients, even if it’s not fully executable I want to be able to distribute my software in a way so that it is convenient for the end user.

I have already tried PyInstaller as well as Py2Exe and I’m facing the same problem with a particular software.

I used the splinter module for my program (which of course is a new high level framework to interact with other frameworks like Selenium) and every time I try to compile it there seems to be a file called “webdriver.xpi” that is always left out from the final package and therefore when the program attempts to execute the web-driver it fails with an IO Error saying that the file “webdriver.xpi” was not found….but other than that the GUI and everything works perfectly fine.

So is there a way to include it even manually? I tried including it manually by browsing to the specific folder @ library.zip file but it didn’t work.

I’m not really expert in this matter and I rely on GUI2Exe for building everything…and I would really appreciate some advice if possible on how to fix this.

Thanks.

  • You must to post comments
0
0

I was at this all day and found a workaround, it’s sneaky but it works. In the error message I was receiving I noticed that there was a space between in library .zip. I could not trace it down in the source code for py2exe or selenium. I too had tried putting the xpi file in the library zip and it did not work. The workaround is:

  1. In your setup file use these options:

    setup(
    console
    =['yourFile.py'],
    options
    ={
    "py2exe":{
    "skip_archive": True,
    "unbuffered": True,
    "optimize": 2
    }
    }
    )
  2. Run the py2exe install

  3. Copy the xpi file into the dist directory

That should do it.

  • You must to post comments
Showing 1 result
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Website