Skip to content

调用ChineseEmoBank.pkl失败 #20

@rongbinf

Description

@rongbinf

其他词典(如HOWNET,正常)

print(ct.__version__)
# 导入pkl词典文件,
print(ct.load_pkl_dict('ChineseEmoBank.pkl'))

报错:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[51], line 3
      1 print(ct.__version__)
      2 # 导入pkl词典文件,
----> 3 print(ct.load_pkl_dict('ChineseEmoBank.pkl'))

File ~\AppData\Local\Programs\Python\Python311\Lib\site-packages\cntext\stats.py:32, in load_pkl_dict(file, is_builtin)
     30 else:
     31     dict_f = open(file, 'rb')
---> 32 dict_obj = pickle.load(dict_f)
     33 return dict_obj

File ~\AppData\Local\Programs\Python\Python311\Lib\site-packages\pandas\core\internals\blocks.py:2400, in new_block(values, placement, ndim, refs)
   2388 def new_block(
   2389     values,
   2390     placement: BlockPlacement,
   (...)
   2397     # - check_ndim/ensure_block_shape already checked
   2398     # - maybe_coerce_values already called/unnecessary
   2399     klass = get_block_type(values.dtype)
-> 2400     return klass(values, ndim=ndim, placement=placement, refs=refs)

TypeError: Argument 'placement' has incorrect type (expected pandas._libs.internals.BlockPlacement, got slice)

环境:

Windows 11 x64
python 3.11.4
pandas 2.1.3
cntext 1.8.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions