Open rongbinf opened 11 months ago
其他词典(如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
I had this problem too
Pandas==1.3.3
same issue with pandas = 2.2.1
I solved this problem by installing pandas==2.0.3. Hope it will be helpful to you
@yaotianzhang pandas==2.0.3 works with me too 👍
其他词典(如HOWNET,正常)
报错:
环境: