Where is the application looking for the data files?

On Wed, Mar 22, 2017, 06:56 David Cortesi <[email protected]> wrote:

>
>
> > I'm not sure what the consequence of this is.
>
> Unfortunately the consequence is that PyInstaller is working fine, your
> --onedir bundle is properly bundling the .wav files and the bundled script
> is looking for them in the correct place, the bundle folder. When you move
> them, it fails. So it was looking there, and there they were, all correct.
>
> Which makes it (to me)  inexplicable why the --onefile bundle does not
> work. All it does is reproduce that bundle folder in temp disk space and
> run from there.
>
> Just for fun, re-make that onedir bundle (or just put the wav files back);
> verify it works; and then drag that folder (dist\myscript) out to the
> desktop or somewhere else. And verify the script in it still runs when the
> folder is somewhere else than the dist folder. Obviously it should.
>
> ANYBODY ELSE WANT TO MAKE A SUGGESTION HERE?
>
>
>
> On Wed, Mar 22, 2017 at 8:41 AM, Owen Walker <[email protected]>
> wrote:
>
>
>
>
> On Monday, March 20, 2017 at 3:51:56 PM UTC-4, davecortesi wrote:
>
> On Mon, Mar 20, 2017 at 12:28 PM, Owen Walker <[email protected]> wrote:
>
>
> I like your second suggestion, because it is easier for on the recipient
> than the first.  The only trouble is that when I use the command:
>
> "pyinstaller --clean -y --onefile --add-data wavFiles;wavFiles
> myscript.py" and I get a single file myscript.exe in the build folder, and
> when I click on this folder, myscript runs, but the wave files don't work.
>
> What am I doing wrong?
>
>
> The only cause I can image for this -- and anybody else? puh-leeze feel
> free to jump in here? -- I'm afraid we have been fooling ourselves about
> the onedir version "working".
>
> It works, but the script is not actually using the wav files that have
> been nicely bundled into the folder. It must be using the original wav
> files wherever they are.
>
> And when the script is running in the context of a folder recreated in
> temp space, it no longer finds the originals -- for reasons we can
> speculate about if I'm right.
>
> To find out, re-bundle as one dir:  pyinstaller --clean -y --oneDIR
> --add-data wavFiles;wavFiles myscript.py
>
> and then deliberately go into the dist\myscript folder and rename or
> delete the copied wav files in there. I'm betting dist\myscrip\myscript.exe
> will still run, because it is finding the original wavFiles\*.wav wherever
> they are and never did use the bundled ones.
>
>
>
>
>
> Dave,
>
>
> Thanks again.
>
> I did what you suggested, entered "pyinstaller --clean -y --oneDIR
> --add-data wavFiles;wavFiles myscript.py" and rmoved the folder wavFiles
> from the dist/myscript folder, and the program did *not *work.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PyInstaller" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/pyinstaller.
> For more options, visit https://groups.google.com/d/optout.
>
-- 

-- 
Raoul Snyman
082 550 3754
[email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.

Reply via email to