yzhangcs / parser

:rocket: State-of-the-art parsers for natural language.
https://parser.yzhang.site/
MIT License
829 stars 141 forks source link

TypeError: namedtuple() got an unexpected keyword argument 'defaults' #15

Closed iseesaw closed 4 years ago

iseesaw commented 4 years ago
[kyzhang@gpu12 biaffine-parser]$ python run.py train -h
Traceback (most recent call last):
  File "run.py", line 5, in <module>
    from parser.cmds import Evaluate, Predict, Train
  File "/users6/kyzhang/attempts/biaffine-parser/parser/cmds/__init__.py", line 3, in <module>
    from .evaluate import Evaluate
  File "/users6/kyzhang/attempts/biaffine-parser/parser/cmds/evaluate.py", line 5, in <module>
    from parser.cmds.cmd import CMD
  File "/users6/kyzhang/attempts/biaffine-parser/parser/cmds/cmd.py", line 4, in <module>
    from parser.utils import Embedding
  File "/users6/kyzhang/attempts/biaffine-parser/parser/utils/__init__.py", line 3, in <module>
    from . import corpus, data, field, fn, metric
  File "/users6/kyzhang/attempts/biaffine-parser/parser/utils/corpus.py", line 10, in <module>
    defaults=[None]*10)
TypeError: namedtuple() got an unexpected keyword argument 'defaults'
iseesaw commented 4 years ago

Can't use under Python 3.6 ???

yzhangcs commented 4 years ago

Python 3.7 works. Or if you do not want to do the prediction, just delete this line.

iseesaw commented 4 years ago

Python 3.7 works. Or if you do not want to do the prediction, just delete this line.

Thanks.