Skip to content

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

@wangpenghehe

Description

@wangpenghehe

提 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions