hash problem?
The Pyweek site is currently rejecting my final submission due to the hash not matching, eek! I'm not sure what I did wrong to create the hash, but I can get the same results each time. I'm running the following on WindowsXP with Python2.5:IDLE 1.2.1 >>> import hashlib >>> m = hashlib.md5() >>> m.update(file('C:\\python\\robottoast\\robot_toast_really_final.zip').read()) >>> print m.hexdigest() bc3a0a2f85b4d10225838ff80d3b9e74
A copy of our game is currently available at http://rapidshare.com/files/105191310/robot_toast_really_final.zip.html
Can anyone give some insight?
(log in to comment)
Comments
Look at this Google cache of the help page. Search for "md5" and read the instructions provided there. Notice the difference.
Yes, hashlib isn't broken, the helpfile was. Why the accusation?
I didn't mean to accuse at all. Due to the way the forum system works I can't really easily find if you had posted about it or not (particularly if you posted as a reply in a thread, and then that was replied to by someone else) and I appreciate that you did go ahead and change the help file.
I guess by posting the Google cache link I was just trying to point out that I was not being crazy and that the help file originally was in the wrong. I'm sorry if any of my language suggested I was trying to accuse you of any intentional wrongdoing. I'm sorry for the misunderstanding, and thanks for putting in the time to accommodate for all of these last-minute issues.
kent_turbo on 2008/04/06 12:28:
Binary files should be opened as 'binary' under windows, otherwise their content's is screwed up. You had to file(path, "rb") to get the hash right.