I'm trying out my first story, which I was planning on having a lot of GIFs in. I imported all my GIFs first and wrote a test page, but when I try testing it out I get this error:
File "storyframe.pyo", line 907, in rebuild
File "Tiddlywiki.pyo", line 189, in toHtml
MemoryError
I'm guessing it has something to do with my GIFs, if I remove pretty much all of them then it doesn't give the error... but even then it just brings up my browser and says it could not find the page. I have about 170 GIFs, project file is about 346MB. If I make a new project and test it without changing anything, it's able to load up in the browser properly.
I'm using the PC version of Twine 1.4.2
Comments
So, yeah, that project is probably not happening as-is in Twine 1 (or 2).
Must the images be embedded or could they simply be included with the HTML file (i.e. archived with it as a pack)?
When Twine builds your story it uses a single Python Unicode String variable to stores the contents of all your passages (including images) before writing it to a file, while doing this it is also encoding each of the passage's text as Unicode if needed. Somewhere in those two processes Python runs out of memory.
[quote author=mindfuldirt]
Not sure what that would be for(again, my first trying any of this), or would archiving it as a pack would be.
In this context "archived with it as a pack" means store the HTML and external image files in something like a ZIP or RAR file.
Twine itself does not create these types of files, you would use third-party software to create the archive file.
If the images are external to the HTML (not embedded within it) and referenced by relative paths, then Twine wouldn't have trouble building your project. The point of archiving (zip, 7z, etc.) the compiled HTML and it's attendant images is to make it easier to download them all together (since the images wouldn't be embedded, you'd have to make them available somehow).
What you want to do instead is to create a sub-directory / sub-folder (eg. images) below the directory / folder you are storing your story TWS and story HTML files in, and use this sub-directory / sub-folder to store your image files in.
Once you have done that you change the image markup in your passages to reference these files, remember to answer NO to the "Do you want to import the image" question when closing the Passage Editor.