Public bug reported: On Ubuntu 11.10, when I try to open a .puz file with xword, I get the following errors:
carl@Ubuntu:~/xword-1.0$ ./xword /tmp/Nov0596a.puz Traceback (most recent call last): File "./xword", line 1822, in <module> w = PuzzleWindow(p) File "./xword", line 1186, in __init__ self.set_puzzle(puzzle) File "./xword", line 1316, in set_puzzle fname = self.get_puzzle_file(puzzle) File "./xword", line 1294, in get_puzzle_file return dir + '/' + puzzle.hashcode() File "./xword", line 314, in hashcode m = md5.new() AttributeError: 'builtin_function_or_method' object has no attribute 'new' I was able to fix it with the following patch: - - - old/usr/games/xword 2012-04-18 03:00:48.000000000 -0400 +++ new/usr/games/xword 2012-04-18 03:39:58.441426002 -0400 @@ -48,7 +48,8 @@ import sys import time import os, os.path -from hashlib import md5 +import hashlib import pickle import ConfigParser @@ -135,7 +136,8 @@ return result def hashcode(self): - m = md5.new() + m = hashlib.md5() m.update(''.join(self.data)) return m.hexdigest() @@ -311,7 +313,8 @@ s1 = ''.join(data) s2 = ';'.join(self.all_clues) - m = md5.new() + m = hashlib.md5() m.update(s1 + s2) return m.hexdigest() ** Affects: xword (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/984676 Title: import of md5 from hashlib fails To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xword/+bug/984676/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs