My favorites | Sign in
Project Logo
             
New issue | Search
for
| Advanced search | Search tips
Issue 28: Spellchecker produces TypeError
1 person starred this issue and may be notified of changes. Back to list
Status:  FixedInSvn
Owner:  ----
Type-Defect
Priority-Medium


Sign in to add a comment
 
Reported by michael.martinides, Feb 20, 2009
What steps will reproduce the problem?
1. Follow installation instruction for spellchecker
2. Execute spellcheck

What is the expected output? What do you see instead?
I get a spellcheck error.

Looking behind the scenes I get this error:
new_dict = _e.enchant_broker_request_dict(self._this,tag)
TypeError: argument number 2: a 'char *' is expected, 'unicode(en)' is received

The patch solves that for me.

What version of the product are you using? On what operating system?
Debian Server. Installed enchant with apt-get


Please provide any additional information below.


Comment 1 by michael.martinides, Feb 20, 2009
--- views.py    (revision 87)
+++ views.py    (working copy)
@@ -49,7 +49,7 @@

         if not enchant.dict_exists(str(lang)):
             raise RuntimeError("dictionary not found for language '%s'" % lang)
-        checker = enchant.Dict(lang)
+        checker = enchant.Dict(str(lang))

         if method == 'checkWords':
             result = [word for word in arg if not checker.check(word)]

Comment 2 by joost.cassee, Feb 20, 2009
This patch will applied in the next revision. Thanks Michael!
Status: Accepted
Comment 3 by joost.cassee, Feb 20, 2009
Fixed in r88.
Status: FixedInSvn
Sign in to add a comment

Hosted by Google Code