xword won't open puzzles (due to deprecated md5 api)

Bug #875451 reported by lykwydchykyn

This bug report was converted into a question: question #195144: xword won't open puzzles.

66
This bug affects 11 people
Affects Status Importance Assigned to Milestone
xword (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Since upgrading to oneiric, xword won't open puzzles. I usually download puzzles from http://www.macnamarasband.com/dlpuz.html. They always worked fine under natty, but I get the following when trying to open one in oneiric:

Traceback (most recent call last):
  File "/usr/games/xword", line 1202, in <lambda>
    self.handler = win.connect('destroy', lambda w: self.exit())
  File "/usr/games/xword", line 1344, in exit
    self.write_puzzle()
  File "/usr/games/xword", line 1338, in write_puzzle
    fname = self.get_puzzle_file(self.puzzle)
  File "/usr/games/xword", line 1294, in get_puzzle_file
    return dir + '/' + puzzle.hashcode()
  File "/usr/games/xword", line 314, in hashcode
    m = md5.new()
AttributeError: 'builtin_function_or_method' object has no attribute 'new'

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: xword 1.0-7ubuntu1
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Uname: Linux 3.0.0-12-generic i686
NonfreeKernelModules: wl
ApportVersion: 1.23-0ubuntu3
Architecture: i386
Date: Sat Oct 15 22:11:57 2011
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: xword
UpgradeStatus: Upgraded to oneiric on 2011-10-14 (1 days ago)

Revision history for this message
lykwydchykyn (me-alandmoore) wrote :
Revision history for this message
lykwydchykyn (me-alandmoore) wrote :

Changing line 314 from:

m = md5.new()

To:

m = md5()

Fixes the bug. Sorry, not sure how to actually submit a patch.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xword (Ubuntu):
status: New → Confirmed
Revision history for this message
Michael Broshi (michaelbroshi) wrote :

The fix from lykwydchykyn worked for me--Thanks!

Revision history for this message
Andy O'Neill (andy-potatoriot) wrote :

I confirm the bug and the fix in comment #2.

Revision history for this message
Eric Lambart (ubuntu-nomeaning) wrote :

Confirming this bug (and the line 314 fix) in Ubuntu 12.04 Beta2.

Thanks lykwydchykyn for the fix/workaround.

Revision history for this message
Gary Wernersbach (gpguitarman1) wrote :

What exactly do I need to do to get xword to work again?

Revision history for this message
Gary Wernersbach (gpguitarman1) wrote :

Xword no longer opens any puzzles.. what do I need to do to fix it? A step by step fix would be greatly appreciated. I just upgraded to Ubuntu 12.04. I love my crosswords!!

Thank you in advance.
gary

Changed in xword (Ubuntu):
status: Confirmed → Invalid
Aaron Sarna (shoofy)
Changed in xword (Ubuntu):
status: Invalid → Confirmed
Revision history for this message
Aaron Sarna (shoofy) wrote :

As lykwydchykyn wrote above, you should open up /usr/games/xword in your favorite editor and replace line 314, which should be:
m = md5.new()
with:
m = md5()
and then save it.

One way to do that would be (from a terminal):
gksu gedit /usr/games/xword
type in your password when prompted
press ctrl+i and type 314 and press enter (this should take you to the line at fault)
replace that whole line with: m = md5()
press save
Now try opening your puzzle again.

Revision history for this message
Gary Wernersbach (gpguitarman1) wrote :

Thank you very much... I am some what familiar working in the terminal, but sometimes I need a step by step to do it. I'm still learning. I love Ubuntu and will never use windoze again.

Revision history for this message
TimMadden (timmadden) wrote :

This edit does fix the issue for me as well. Thank you.
As an alternative for those leery of editing root owned program files, you could run the windows version of the across lite. Across lite is a free (as in beer) crossword puzzle application. To run across lite on ubuntu, you would need to install Wine from the Ubuntu Software Center first and then run the across lite installer. You should be able to open .puz files with across lite. I did find that I had to turn off the timer tool for it to work well, but otherwise works well.
From what I can see, Xword has not had any updates for a couple years and this bug has been around for some time. I am not very familiar with python or the structure of the code in xword, so I don't know if this is a good fix or just a workaround.

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

While marking duplicate bug 984676 I notidced it offers an alternative patch, though I don't know which of them are considered the "best".

I also noticed that the development version of Ubuntu (Quantal Quetzal / 12.10) has a newer version of xword (2.0.0~rc2-1). Has anyone tested the development version to see whether this issue is still present there or if it has been resolved?

tags: added: precise
summary: - xword won't open puzzles
+ xword won't open puzzles (due to deprecated md5 api)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.