简体   繁体   中英

TypeError: __init__() got an unexpected keyword argument 'name' - CONVOKIT

I am working with this dataset.

When I try:

from convokit import Corpus, User, Utterance

corpus_users = {k: User(name=k, meta=v) for k,v in user_meta_dict.items()}

I get:

TypeError: __init__() got an unexpected keyword argument 'name'

Because init function of the class User takes as parameter:

 owner=None,
 id: str = None,
 utts=None,
 convos=None,
 meta: Union[Dict, NoneType] = None

so since name is not a Parameter of the function User you get this kind of error

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM