0 votes
asked by (130 points)
I embedded far too many gifs and pics into this game, and received the error message above. I've been through the other threads on this and:

1. My backup is old.

2. I do not have an HTML or a useable source code .Twee file

I'm fairly sure I'm screwed here, and just wish I had realized the problem and deleted a bunch of images before I closed the file, but I didn't. So the question: Is there any way to delete said images without opening the file, or failing that, to save the text?

1 Answer

+1 vote
answered by (59.4k points)
Not easily.  The serialization used by Twine 1 projects (TWS files)--Python's pickle format--is not really compatible with anything else and editing it by hand is difficult, though not impossible.

Assuming that the error is from a memory issue and not something else, your best bet would probably be to get someone with more memory to load your project and either break it into smaller chunks for you or just delete the images.  Can you put the TWS up someplace?

Media heavy projects are better off including the media files separately and simply referencing them.  That said, if embedding your media is something you really want to do, then converting your project to Twee source and using a Twee compiler like Tweego to embed your media would be a better choice--I've tested it up to 1 GiB of embedded media with no problems, not that I suggest you embed that much.
commented by (130 points)
Thanks, this is very helpful, and what I figured. I could upload the .tws into google or dropbox if that's helpful. I could make the game leaner, I just didn't realize I'd put in so many images.

https://drive.google.com/file/d/1wjq_J96XZWttKK9BOet-QuKi_FsbeMMu/view?usp=sharing
commented by (59.4k points)
Unfortunately, it appears that Twine truncated the file during your last save, so the pickle is incomplete.  I don't know enough about Python's pickle serialization format to recover what's left of your project.  :(
commented by (58.4k points)
Assuming the last time you tested the game in your browser, everything worked, you could try to browse your history for a working version of the html file, then save it (right click > save as in windows, file > save as on mac) and import it back into Twine.

You may lose some data, but it's probably better than the alternative. Obviously, the best way to avoid these problems is to back up your files; version control might be the best way.
commented by (127k points)
edited by

As explained by @TheMadExile your project file is incomplete (damaged) and no longer contains all the information of your story project.

If the method described by @Chapel doesn't work for you then the recovered.txt file in the following linked archive file may help you recreate your story project.

edit: link to hosted archive file removed!

note: Let me know when you've downloaded the above file, or if you don't want, so I can delete it from the file hosting site,

The above file was generated (1) by extracting all the (base-64) image data from your original TWS file so that it now only contains standard Passage information, although it is still structured like a story project TWS file the Twine 1.x application still can't open it because it's still incomplete.

You can however open the recovered.txt file within a Text Editor (like Notepad) and page down through the file's contents to find the Passage information.

(1) I have also include the recover.py Python file used to generate the recovered.txt.

commented by (130 points)
Good idea! Traveling for a few hours but thank you! Will try tonight!
commented by (130 points)
Will try this in the next 24 hours.
Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.
...