weixin_48080923 2022-01-28 21:34 采纳率: 0%
浏览 224

python项目报错

我在github上下载了刘老师的一个项目https://github.com/liuhuanyong/TextGrapher%E3%80%82%E4%BD%86%E4%B8%8B%E8%BD%BD%E5%88%B0%E6%9C%AC%E5%9C%B0%E4%BB%A5%E5%90%8E%E8%BF%90%E8%A1%8C%E4%B8%8D%E6%88%90%E5%8A%9F%EF%BC%8C%E4%B8%8D%E7%9F%A5%E9%81%93%E8%AF%A5%E6%80%8E%E4%B9%88%E8%A7%A3%E5%86%B3%E6%9C%89%E5%A4%A7%E4%BD%AC%E8%83%BD%E5%B8%AE%E5%8A%A9%E7%9C%8B%E4%B8%80%E4%B8%8B%E4%B9%88%EF%BC%9F

img

img

img

img

Traceback (most recent call last):
  File "D:\github\text\TextGrapher-master\text_grapher.py", line 225, in <module>
    handler = CrimeMining()
  File "D:\github\text\TextGrapher-master\text_grapher.py", line 17, in __init__
    self.parser = LtpParser()
  File "D:\github\text\TextGrapher-master\sentence_parser.py", line 12, in __init__
    self.segmentor = Segmentor()
TypeError: __init__(): incompatible constructor arguments. The following argument types are supported:
    1. pyltp.Segmentor(model_path: str, lexicon_path: str = None, force_lexicon_path: str = None)

Invoked with:



已经安装了pyltp
  • 写回答

2条回答 默认 最新

  • CSDN专家-黄老师 2022-01-29 09:04
    关注

    这个应该是模块的版本更新问题导致的,建议你按照教程的版本安装

    评论

报告相同问题?

问题事件

  • 创建了问题 1月28日

悬赏问题

  • ¥15 wpf datagrid如何实现多层表头
  • ¥15 为啥画版图在Run DRC会出现Connect Error?可我Calibre的hostname和计算机的hostname已经设置成一样的了。
  • ¥20 网站后台使用极速模式非常的卡
  • ¥20 Keil uVision5创建project没反应
  • ¥15 mmseqs内存报错
  • ¥15 vika文档如何与obsidian同步
  • ¥15 华为手机相册里面的照片能够替换成自己想要的照片吗?
  • ¥15 陆空双模式无人机飞控设置
  • ¥15 sentaurus lithography
  • ¥15 关于#linux#的问题:子进程1等待子进程A、B退出后退出(语言-c语言)