Code Monkey home page Code Monkey logo

seedarchangel / tuchart Goto Github PK

View Code? Open in Web Editor NEW
774.0 87.0 287.0 6.58 MB

Tuchart is a visualization interface for the Chinese stock market. Tuchart supports candlestick charts, price charts, tick data, high-frequency data and distribution of top shareholders for individual stocks. Tuchart是一个基于pyqt和echarts的股票视觉化应用。Tuchart 支持日/月线,分笔,高频数据,前十股东分笔的视觉化

License: MIT License

Python 100.00%
pyqt echarts tushare visualization stock-market

tuchart's Issues

Keyerror: "['date'] not in index"

如果在启动时遇到这个问题,是因为tushare新版本的get_industry_classified()有问题,需要使用
pip uninstall tushare
然后
pip install tushare==0.8.6
即可

This webpage is not found

运行起来了,但是加载不出K线图表来,提示:This webpage is not found
No webpage was found for the web address: file:///Users/TuChart/Tuchart/render.html

支持python3吗

我尝试在python3安装tuchart没有成功,不知道是不是tuchart还不支持python3?
另外,这个只是在windows环境使用的吧。
谢谢!

UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-3: ordinal not in range(128)

$ python main.py
Less than 12 hours. Loading previously saved Pickle...
Traceback (most recent call last):
File "main.py", line 372, in
w = MyUi()
File "main.py", line 94, in init
self.init_treeWidget(list1,series)
File "main.py", line 141, in init_treeWidget
var = series.loc[series["c_name"] == j]
File "/opt/anaconda2/lib/python2.7/site-packages/pandas/core/ops.py", line 1728, in wrapper
(is_extension_array_dtype(other) and not is_scalar(other))):
File "/opt/anaconda2/lib/python2.7/site-packages/pandas/core/dtypes/common.py", line 1749, in is_extension_array_dtype
registry.find(dtype) is not None)
File "/opt/anaconda2/lib/python2.7/site-packages/pandas/core/dtypes/dtypes.py", line 89, in find
return dtype_type.construct_from_string(dtype)
File "/opt/anaconda2/lib/python2.7/site-packages/pandas/core/dtypes/dtypes.py", line 699, in construct_from_string
raise TypeError(msg.format(string))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-3: ordinal not in range(128)

his webpage is not found ERR_FILE_NOT_FOUND

python main.py
Less than 12 hours. Loading previously saved Json...
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
js: /deep/ combinator is deprecated. See https://www.chromestatus.com/features/6750456638341120 for more details.

绘图失败

但是每次启动都是第一次显示的绘制万科的数据,go back之后,要么绘制失败显示空白,要么是显示核心已转储
具体错误如下:

  • 安装及运行步骤参照的是你的文档,conda版本是4.3

[Getting data:]Traceback (most recent call last):
File "/home/ros/anaconda2/lib/python2.7/site-packages/Tuchart/main.py", line 352, in classify
graphpage(labels, startdate,enddate,option,width, height)#labels:复权ork线or分笔 option:hfq, qfq or 15, 30, D, etc
File "/home/ros/anaconda2/lib/python2.7/site-packages/Tuchart/Graph.py", line 31, in graphpage
a = generateline(j[1],j[2],startdate,enddate,option)#stock number, Type, startdate, enddate, 30 or 15 or days
File "/home/ros/anaconda2/lib/python2.7/site-packages/Tuchart/Graph.py", line 317, in generateline
Open = array["open"].tolist()
File "/home/ros/.local/lib/python2.7/site-packages/pandas/core/frame.py", line 1964, in getitem
return self._getitem_column(key)
File "/home/ros/.local/lib/python2.7/site-packages/pandas/core/frame.py", line 1971, in _getitem_column
return self._get_item_cache(key)
File "/home/ros/.local/lib/python2.7/site-packages/pandas/core/generic.py", line 1645, in _get_item_cache
values = self._data.get(item)
File "/home/ros/.local/lib/python2.7/site-packages/pandas/core/internals.py", line 3590, in get
loc = self.items.get_loc(item)
File "/home/ros/.local/lib/python2.7/site-packages/pandas/core/indexes/base.py", line 2444, in get_loc
return self._engine.get_loc(self._maybe_cast_indexer(key))
File "pandas/_libs/index.pyx", line 132, in pandas._libs.index.IndexEngine.get_loc (pandas/_libs/index.c:5280)
File "pandas/_libs/index.pyx", line 154, in pandas._libs.index.IndexEngine.get_loc (pandas/_libs/index.c:5126)
File "pandas/_libs/hashtable_class_helper.pxi", line 1210, in pandas._libs.hashtable.PyObjectHashTable.get_item (pandas/_libs/hashtable.c:20523)
File "pandas/_libs/hashtable_class_helper.pxi", line 1218, in pandas._libs.hashtable.PyObjectHashTable.get_item (pandas/_libs/hashtable.c:20477)
KeyError: 'open'
已放弃 (核心已转储)

建议

对你这个项目有兴趣,我也一直想做行情软件。软件的关键是:
1.市场情绪获得与分析展现,抓取实时的数据,叠加分析,2.股票分类管理,板块,股票,指数等关联分析与叠加分析

最终达到的目标:在什么市场情绪下做什么样的股票。现在的行情软件都不能提供这些信息出来。至于大股东信息,等等那些东西,都不重要。有兴趣可以一起探讨下,我QQ微信: 99945390

Error when running pip install tuchart

This is the output when running pip install tuchart

Collecting tuchart
  Using cached https://files.pythonhosted.org/packages/29/7b/98e22f98a774a8e19b1b82f376f02d73013dbaaf581966627172fa17a736/tuchart-0.1.2.7-py2.py3-none-any.whl
Collecting qtpy (from tuchart)
  Using cached https://files.pythonhosted.org/packages/8a/d1/f7a708cfd4171b04196607274371d343ba84af2e39be22f310d1ec4ed91e/QtPy-1.4.2-py2.py3-none-any.whl
Collecting pyecharts==0.2.0 (from tuchart)
  Using cached https://files.pythonhosted.org/packages/da/9a/ada963b81d1608c5a195fe2a9dcbe2028ed8ac1c492a631c28c2a9cdcbb6/pyecharts-0.2.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "C:\Users\jmorales\AppData\Local\Temp\pip-install-4t1k2u4e\pyecharts\setup.py", line 7, in <module>
        from jupyterpip import cmdclass
    ImportError: No module named 'jupyterpip'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\jmorales\AppData\Local\Temp\pip-install-4t1k2u4e\pyecharts\setup.py", line 12, in <module>
        pip.main(['install', 'jupyter-pip'])
    AttributeError: module 'pip' has no attribute 'main'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\jmorales\AppData\Local\Temp\pip-install-4t1k2u4e\pyecharts\

This is my setup:

Python version: 3.5
OS: Windows 10 Home
System Type: 64-bit Operating System, x64-based processor
Processor: AMD A10-8700P Radeon R6

Error when running pip install tuchart

This is the output when running pip install tuchart

Collecting tuchart
  Downloading https://files.pythonhosted.org/packages/29/7b/98e22f98a774a8e19b1b82f376f02d73013dbaaf581966627172fa17a736/tuchart-0.1.2.7-py2.py3-none-any.whl
Collecting qtpy (from tuchart)
  Downloading https://files.pythonhosted.org/packages/8a/d1/f7a708cfd4171b04196607274371d343ba84af2e39be22f310d1ec4ed91e/QtPy-1.4.2-py2.py3-none-any.whl
Collecting pyecharts==0.2.0 (from tuchart)
  Downloading https://files.pythonhosted.org/packages/da/9a/ada963b81d1608c5a195fe2a9dcbe2028ed8ac1c492a631c28c2a9cdcbb6/pyecharts-0.2.0.tar.gz (1.6MB)
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "C:\Users\jmorales\AppData\Local\Temp\pip-install-uyek8e91\pyecharts\setup.py", line 7, in <module>
        from jupyterpip import cmdclass
    ImportError: No module named 'jupyterpip'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\jmorales\AppData\Local\Temp\pip-install-uyek8e91\pyecharts\setup.py", line 12, in <module>
        pip.main(['install', 'jupyter-pip'])
    AttributeError: module 'pip' has no attribute 'main'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\jmorales\AppData\Local\Temp\pip-install-uyek8e91\pyecharts\

This is my setup:

Python version: 3.5
OS: Windows 10 Home
System Type: 64-bit Operating System, x64-based processor
Processor: AMD A10-8700P Radeon R6

运行出现错误, 显示module未找到

所有的dependency 都装好了, 在python2 下运行, 出现以下提示:

c:\Users\tommy\Anaconda3\Lib\site-packages\Tuchart>python main.py
Traceback (most recent call last):
File "main.py", line 8, in
from Graph import graphpage
File "c:\Users\tommy\Anaconda3\Lib\site-packages\Tuchart\Graph.py", line 3, in
from pyecharts import Kline, Line, Page,Overlap,Bar,Pie,Timeline
File "C:\Users\tommy\Anaconda3\lib\site-packages\pyecharts_init_.py", line 10, in
from pyecharts.charts.effectscatter import EffectScatter
File "C:\Users\tommy\Anaconda3\lib\site-packages\pyecharts\charts\effectscatter.py", line 4, in
from pyecharts.charts.scatter import Scatter
File "C:\Users\tommy\Anaconda3\lib\site-packages\pyecharts\charts\scatter.py", line 4, in
from PIL import Image
File "C:\Users\tommy\Anaconda3\lib\site-packages\PIL\Image.py", line 56, in
from . import _imaging as core
ImportError: DLL load failed: The specified module could not be found.\

请问什么原因,是哪个包没有装么?

ImportError: No module named sip

python2 在 ubuntu 和 windows 不能跑....,都是缺少 sip.

Traceback (most recent call last):
  File "main.py", line 3, in <module>
    import os,sys,sip,time
ImportError: No module named sip

pip install tuchart失败 安装失败

    ERROR: Command errored out with exit status 1:
     command: 'C:\ProgramData\Anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Public\\Documents\\Wondershare\\CreatorTemp\\pip-install-_rvqf25f\\tushare\\setup.py'"'"'; __file__='"'"'C:\\Users\\Public\\Documents\\Wondershare\\CreatorTemp\\pip-install-_rvqf25f\\tushare\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-_rvqf25f\tushare\pip-egg-info'
         cwd: C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-install-_rvqf25f\tushare\
    Complete output (1 lines):
    error in tushare setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Unordered types are not allowed
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

error when running: python main.py

运行python main.py 出现以下错误

[2380 rows x 3 columns]
Traceback (most recent call last):
File "main.py", line 312, in
w = MyUi()
File "main.py", line 109, in init
retain_size.setRetainSizeWhenHidden(True)
AttributeError: 'QSizePolicy' object has no attribute 'setRetainSizeWhenHidden'

C:\Anaconda2\Lib\site-packages\Tuchart>

这是什么原因?

k线与Volume

请问有没有办法把 K线 和 volume 做成一张图,时间对齐,并且共用同一个缩放?

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.