#12 Incompatible with Wordnet 2.1

open
nobody
None
5
2005-10-19
2005-10-19
Cerin
No

With Wordnet 2.1 installed, pyWordnet complains when
you try import wordnet, saying:

>>> import wordnet
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "C:\Program
Files\Python24\lib\site-packages\wordnet.py", line 767,
in ?
setupLexnames()
File "C:\Program
Files\Python24\lib\site-packages\wordnet.py", line 763,
in se
tupLexnames
for l in open(WNSEARCHDIR+'/lexnames').readlines():
IOError: [Errno 2] No such file or directory:
'C:\\Program Files\\WordNet\\2.1\\ dict/lexnames'

Discussion

  • Martin Thorsen Ranang

    Logged In: YES
    user_id=1309449

    Hi,

    I'm sorry I didn't see this earlier. I would just like you
    to know that if you look at patch "[1481441] Update for
    version 2.1 of WordNet" under "Patches", you might find a
    solution to this problem.

    Yours,

    Martin

     
  • Kurt

    Kurt - 2007-08-19

    Logged In: YES
    user_id=291238
    Originator: NO

    I have a similar problem under Linux. I have already applied the patch and still get this error:

    Python 2.5.1 (r251:54863, May 2 2007, 16:56:35)
    [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from wordnet import *
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "wordnet.py", line 773, in <module>
    setupLexnames()
    File "wordnet.py", line 769, in setupLexnames
    for l in open(WNSEARCHDIR+'/lexnames').readlines():
    IOError: [Errno 2] No such file or directory: '/usr/local/wordnet2.0/dict/lexnames'
    >>>
    I had already installed WordNet and even experimented with WNHOME and WNSEARCHDIR but since there is no '/lexnames' anywhere on my system I don't know where to go from here without getting my hands dirty. Both wn and wnb seem to be working OK, but could I be missing something if I don't have "/dict/lexnames" on my system or is the problem in wordnet.py?

     

Log in to post a comment.