http://gyazo.com/fc4ee1e44c0e095456b311654d9ee5e7 Seems likely that the gif writing function is somehow getting a file object rather than the string path to a file.