Skip to content

list index out of range error #44

@raphael10-collab

Description

@raphael10-collab
(verbnet) raphy@pc:~/ConceptNet/Verbnet/verbnet/api$ python
Python 3.8.10 (default, Sep 28 2021, 16:10:42) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import verbnet
>>> verbnet.VerbNetParser(version="3.4")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/raphy/ConceptNet/Verbnet/verbnet/api/verbnet.py", line 57, in __init__
    vc = VerbClass(parse.VNCLASS, version)
  File "/home/raphy/ConceptNet/Verbnet/verbnet/api/verbnet.py", line 250, in __init__
    self.subclasses = self._subclass()
  File "/home/raphy/ConceptNet/Verbnet/verbnet/api/verbnet.py", line 337, in _subclass
    return [VerbClass(sub_soup, self.version) for sub_soup in \
  File "/home/raphy/ConceptNet/Verbnet/verbnet/api/verbnet.py", line 337, in <listcomp>
    return [VerbClass(sub_soup, self.version) for sub_soup in \
  File "/home/raphy/ConceptNet/Verbnet/verbnet/api/verbnet.py", line 250, in __init__
    self.subclasses = self._subclass()
  File "/home/raphy/ConceptNet/Verbnet/verbnet/api/verbnet.py", line 337, in _subclass
    return [VerbClass(sub_soup, self.version) for sub_soup in \
  File "/home/raphy/ConceptNet/Verbnet/verbnet/api/verbnet.py", line 337, in <listcomp>
    return [VerbClass(sub_soup, self.version) for sub_soup in \
  File "/home/raphy/ConceptNet/Verbnet/verbnet/api/verbnet.py", line 250, in __init__
    self.subclasses = self._subclass()
  File "/home/raphy/ConceptNet/Verbnet/verbnet/api/verbnet.py", line 335, in _subclass
    if len(subclasses_soup[0].text) < 1:
IndexError: list index out of range
>>> 

This is the config.txt :

(verbnet) raphy@pc:~/ConceptNet/Verbnet/verbnet/api$ cat config.txt 
//Set the path to where your VerbNet files live

VERBNET_PATH_3.4 = ../verbnet3.4
//VERBNET_PATH_3.3 = path/to/verbnet_version3.3

FRAMENET_MAPPING_PATH = ./verbnet3.4/

How to solve it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions