funcat icon indicating copy to clipboard operation
funcat copied to clipboard

在windows 7 & python 3.6.2运行常规指标报错

Open wangpenghehe opened this issue 6 years ago • 2 comments

提 ISSUE 须知

如果是 bug 反馈,烦请在 issue 中描述以下问题:

1. funcat 的版本

0.3.2

2. Python 的版本

3.6.2

3. 是 Windows / Linux / MacOS or others?

Windows

4. 您出现问题对应的源码 / 或者能复现问题的简易代码

C:\Users\Administrator>python Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 10:22:32) [MSC v.1900 64 bi t (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.

from funcat import * from funcat.data.tushare_backend import TushareDataBackend set_data_backend(TushareDataBackend()) T("20180518") S("000001.XSHG") print(O, H, L, C) 3151.08 3193.45 3144.78 3193.3 MA(C, 60)

5. 您出现的错误堆栈日志信息

C:\Users\Administrator>python Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 10:22:32) [MSC v.1900 64 bi t (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.

from funcat import * from funcat.data.tushare_backend import TushareDataBackend set_data_backend(TushareDataBackend()) T("20180518") S("000001.XSHG") print(O, H, L, C) 3151.08 3193.45 3144.78 3193.3 MA(C, 60) Traceback (most recent call last): File "D:\ProgramData\Anaconda3\lib\site-packages\talib_init_.py", line 20, in wrapper for arg in chain(args, kwargs.values()) StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\ProgramData\Anaconda3\lib\site-packages\funcat\func.py", line 31, in init series = self.func(series, arg) File "D:\ProgramData\Anaconda3\lib\site-packages\talib_init_.py", line 24, in wrapper return func(*args, **kwargs) File "_func.pxi", line 7863, in talib._ta_lib.MA TypeError: only size-1 arrays can be converted to Python scalars

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 1, in File "D:\ProgramData\Anaconda3\lib\site-packages\funcat\func.py", line 33, in init raise FormulaException(e) funcat.utils.FormulaException: only size-1 arrays can be converted to Python sca lars

wangpenghehe avatar May 27 '18 09:05 wangpenghehe

我也遇到同样的问题,但是一直无解

simplezhang57 avatar Sep 21 '18 06:09 simplezhang57

这个问题解决了么。我今天在linux(Debian 9)下python版本2.7和3.5都试了,同样的错误

zhangshoug avatar Feb 16 '19 09:02 zhangshoug