alexandrainst / danlp

DaNLP is a repository for Natural Language Processing resources for the Danish Language.
BSD 3-Clause "New" or "Revised" License
199 stars 34 forks source link

TypeError during import #163

Open emilbakke opened 2 years ago

emilbakke commented 2 years ago

Just installed danlp and tried following the instructions to import models. Whenever I do so, it throws a TypeError. E.g.:

from danlp.models import load_xlmr_coref_model
TypeError: CoreferenceResolver.forward: `inputs` must be present

I am met with the same error when trying to import other models, e.g. load_bert_tone_model and load_spacy_model

Thanks for the great work and tools provided!

ophelielacroix commented 2 years ago

Thanks for reporting the error. What is the python version that you use? And the allennlp version?

emilbakke commented 2 years ago

Thanks for reply.

Python version is 3.9.7 Allennlp version is 2.9.0

Rune-Nedergaard commented 1 year ago

I get the same issue

Edit: @emilbakke I think I fixed it by: 1) Using Python 3.8.13 2) Installing packages manually instead of using the pip install .[all] command

However, when I run:

xlmr = load_xlmr_coref_model()

It downloads the model which Windows defenders tells me is malware called "Trojan:Script/Wacatac.B!ml" and isolates it, which causes the script not to run.