Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wangpenghehe opened this issue May 27, 2018 · 2 comments
Open

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

wangpenghehe opened this issue May 27, 2018 · 2 comments

Comments

@wangpenghehe
Copy link

提 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 wangpenghehe changed the title 在windows 7 & python 3.6.2运行常规 指定报错 在windows 7 & python 3.6.2运行常规指标报错 May 27, 2018
@simplezhang57
Copy link

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

@zhangshoug
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants