Giter VIP home page Giter VIP logo

futureholderrank's Issues

执行python3 run.py出错

/usr/lib64/python3.6/site-packages/pandas/core/ops/init.py:1115: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
result = method(y)
2019-09-04 14:05:54,833 - dce.py[line:144] - ERROR: 数据处理线程出错, 文件地址:./tmp/20040105_DCE_DPL.zip,错误信息:[Errno 20] Not a directory: 'tmp/20040105_DCE_DPL.zip/20040105_m0401_│╔╜╗┴┐_┬≥│╓▓╓_┬⌠│╓▓╓┼┼├√.txt'

服务器用的是CentOS7
python3.6.7

中金的只取到2020.3.13,报错如下,请码主看下啦。

C:\Anaconda3\lib\site-packages\pandas\core\frame.py:1554: FutureWarning: Using short name for 'orient' is deprecated. Only the options: ('dict', list, 'series', 'split', 'records', 'index') will be used in a future version. Use one of the above to silence this warning.
FutureWarning,
C:\Anaconda3\lib\site-packages\pandas\core\frame.py:4449: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
errors=errors,
Exception in thread Thread-2:
Traceback (most recent call last):
File "C:\supe\FutureHolderRank-master\cffex.py", line 127, in run
self.parse_data(xml_dict)
File "C:\supe\FutureHolderRank-master\cffex.py", line 138, in parse_data
date = xml_dict['positionRank']['positionamt'][0]['tradingday']
KeyError: 'positionamt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Anaconda3\lib\threading.py", line 926, in _bootstrap_inner
self.run()
File "C:\supe\FutureHolderRank-master\cffex.py", line 132, in run
log.logger.error('数据处理线程出错, 时间:%s,错误信息:%s' % (xml_dict['positionRank']['positionamt'][0]['tradingday'], e), exc_info=True)
KeyError: 'positionamt'

两个需求建议

1.如果我只想获得某个交易所某天的数据,那么应该如何运行程序?能否通过命令行传入参数,而不是修改setting.py?因为我的需求是每天拿最新的数据,过去的部分我会感兴趣,但是不需要这么长的数据。我尝试改类的pubDate到2019年9月1日,似乎没用

2.另外每天盘后出数据的时间各不相同,如果是指定获得某一天的数据,能否如果还没有数据就通过某种返回让调用的程序知道还没有数据?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.