4000-520-616
欢迎来到免疫在线!(蚂蚁淘生物旗下平台)  请登录 |  免费注册 |  询价篮
主营:原厂直采,平行进口,授权代理(蚂蚁淘为您服务)
咨询热线电话
4000-520-616
当前位置: 首页 > 新闻动态 >
热卖商品
新闻详情
python处理can协议文件_Python,如何处理“ ValueError..._CSDN博客
来自 : CSDN技术社区 发布时间:2021-03-25

\"\"

I installed all the required python packages, and copied the code into a script I named main.py, and ran it.

I got this error:

[davide laptop]$ python main.py

Traceback (most recent call last):

File main.py , line 8, in

training_df pd.read_hdf( ./paper/targetfinder/K562/output-epw/training.h5 , training ).set_index([ enhancer_name , promoter_name ])

File /usr/lib64/python2.7/site-packages/pandas/io/pytables.py , line 330, in read_hdf

return store.select(key, auto_close auto_close, **kwargs)

File /usr/lib64/python2.7/site-packages/pandas/io/pytables.py , line 680, in select

return it.get_result()

File /usr/lib64/python2.7/site-packages/pandas/io/pytables.py , line 1364, in get_result

results self.func(self.start, self.stop, where)

File /usr/lib64/python2.7/site-packages/pandas/io/pytables.py , line 673, in func

columns columns, **kwargs)

File /usr/lib64/python2.7/site-packages/pandas/io/pytables.py , line 2786, in read

values self.read_array( block%d_values % i)

File /usr/lib64/python2.7/site-packages/pandas/io/pytables.py , line 2327, in read_array

data node[:]

File /usr/lib64/python2.7/site-packages/tables/vlarray.py , line 677, in __getitem__

return self.read(start, stop, step)

File /usr/lib64/python2.7/site-packages/tables/vlarray.py , line 817, in read

outlistarr [atom.fromarray(arr) for arr in listarr]

File /usr/lib64/python2.7/site-packages/tables/atom.py , line 1211, in fromarray

return cPickle.loads(array.tostring())

ValueError: unsupported pickle protocol: 4

I ve no idea about what this pickle protocol means, and also my colleagues know nothing about it.

How can I solve this problem?

I m using Python 2.7.5 on a CentOS Linux release 7.2.1511 (Core) operating system

解决方案

The Pickle protocol is basically the file format. From the documentation,

The higher the protocol used, the more recent the version of Python needed to read the pickle produced. ... Pickle protocol version 4 was added in Python 3.4, your python version (2.7.5) does not support this.

Either upgrade to Python 3.4 or later (current is 3.5) or create the pickle using a lower protocol (2) in the third parameter to pickle.dump().

\"\" \"\" \"\" 点赞 \"\" \"\" 评论

本文链接: http://cannameds.immuno-online.com/view-749510.html

发布于 : 2021-03-25 阅读(0)
公司介绍
品牌分类
Others
联络我们
服务热线:4000-520-616
(限工作日9:00-18:00)
QQ :1570468124
手机:18915418616
官网:http://