I was able to fix it, the only reason it wasn't working was because I
hadn't updated my spec file. I had been testing with packaging my script
into one folder, and once that was working, I tried with one file. When I
did this, it created a new spec file, and I simply just forgot to edit it.
Once I added the data files into the spec file like so, it worked perfect!
Thanks!
added_files = [
('beats', 'beats'),
('imgs', 'imgs')
]
a = Analysis(['yep.py'],
pathex=['/Users/mitchell/Workspace/freestylez'],
binaries=None,
datas=added_files
)
On Wed, Dec 21, 2016 at 4:30 PM <[email protected]> wrote:
> From the error it seems like its already looking there, the _MEIYB5FHD
> folder is the temporary folder, although did you pack the images along with
> the /img/ folder into the exe? If you just packed the images and not the
> folder then just knock off the /img/ in your load string:
>
> pic1 = pyglet.image.load(resource_path('ad.jpg'))
>
>
> I tend to wrap assets in a zip file (sans folders) when embedding in an
> exe, then do this:
>
> myzipfile = zipfile.ZipFile(resource_path('data.zip'),'r')
> for fileName in myzipfile.namelist():
> if fileName == 'picture.PNG':
> myzipfile.extract(fileName,resource_path(''))
> self.image = pyglet.image.load(resource_path(fileName))
> os.remove(resource_path(fileName))
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "pyglet-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/pyglet-users/q8diddF_uU8/unsubscribe.
> To unsubscribe from this group and all its topics, 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/pyglet-users.
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"pyglet-users" 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/pyglet-users.
For more options, visit https://groups.google.com/d/optout.