UKPLab / framenet-tools

Annotate text with FrameNet frames and arguments.
Apache License 2.0
10 stars 2 forks source link

FrameNet Tools Download Throwing OSError #27

Closed djinn-anthrope closed 4 years ago

djinn-anthrope commented 4 years ago

Describe the bug FrameNet Tools Download throws OSError for an undefined symbol.

To Reproduce Steps to reproduce the behavior:

  1. Clone the repo and run pip install -e .
  2. Run framenet_tools download --path /path/to/download_location

Expected behavior Framenet tools get downloaded (according to README)

Error message OSError: /home/.local/lib/python3.8/site-packages/torchtext/_torchtext.so: undefined symbol: _ZN3c1023_fastEqualsForContainerERKNS_6IValueES2_

Based on the traceback

Traceback (most recent call last):
  File "/home/.local/bin/framenet_tools", line 11, in <module>
    load_entry_point('framenet-tools', 'console_scripts', 'framenet_tools')()
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2852, in load_entry_point
    return ep.load()
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2443, in load
    return self.resolve()
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2449, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/framenet-tools/framenet_tools/main.py", line 11, in <module>
    from framenet_tools.pipeline import Pipeline
  File "/home/framenet-tools/framenet_tools/pipeline.py", line 8, in <module>
    from framenet_tools.evaluator import evaluate_stages
  File "/home/framenet-tools/framenet_tools/evaluator.py", line 8, in <module>
    from framenet_tools.frame_identification.frameidentifier import get_dataset
  File "/home/framenet-tools/framenet_tools/frame_identification/frameidentifier.py", line 9, in <module>
    from torchtext import data
  File "/home/.local/lib/python3.8/site-packages/torchtext/__init__.py", line 42, in <module>
    _init_extension()
  File "/home/.local/lib/python3.8/site-packages/torchtext/__init__.py", line 38, in _init_extension
    torch.ops.load_library(ext_specs.origin)
  File "/home/.local/lib/python3.8/site-packages/torch/_ops.py", line 105, in load_library
    ctypes.CDLL(path)
  File "/usr/lib64/python3.8/ctypes/__init__.py", line 373, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /home/.local/lib/python3.8/site-packages/torchtext/_torchtext.so: undefined symbol: _ZN3c1023_fastEqualsForContainerERKNS_6IValueES2_

Please complete the following information:

Additional context I think that this issue is related to the pytorch and torchtext version, but I could not find any resources on the same.

jcklie commented 4 years ago

I also think that, the issue most likely is that we did not fix the versions. Which versions of pytorch and torchtext are you using?

djinn-anthrope commented 4 years ago

@jcklie pytorch==1.5.0; torch==0.7.0

jcklie commented 4 years ago

I use torch==1.5.1, torchtext==0.6.0, maybe you can try these versions and report back whether the error is gone or not.

djinn-anthrope commented 4 years ago

I use torch==1.5.1, torchtext==0.6.0, maybe you can try these versions and report back whether the error is gone or not.

This combination works :+1:

I think it is the torchtext version, because torhtext 0.7.0 does not work at all, regardless of torch version, and gives the same error. I think it would be useful to mention in the README :)

Thanks for the help @jcklie !

jcklie commented 4 years ago

Thank you for using this tool! I will tag the version in the requirements and setup so that it automatically uses that pytorch.