Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

调用ChineseEmoBank.pkl失败 #20

Open
rongbinf opened this issue Nov 26, 2023 · 2 comments
Open

调用ChineseEmoBank.pkl失败 #20

rongbinf opened this issue Nov 26, 2023 · 2 comments

Comments

@rongbinf
Copy link

其他词典(如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
@JasonHuang0812
Copy link

I had this problem too

@Liangjunjian1999
Copy link

Pandas==1.3.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants