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

页面打开都是空白的看过来 #337

Open
sofs2005 opened this issue Dec 16, 2024 · 13 comments
Open

页面打开都是空白的看过来 #337

sofs2005 opened this issue Dec 16, 2024 · 13 comments

Comments

@sofs2005
Copy link

我今天刚装的docker版本,是今天刚更新的最新版。
装好后打开为什么页面都是空白的啊,什么数据都没有
执行
python execute_daily_job.py 2024-10-01 2024-12-15

Traceback (most recent call last):
File "/data/InStock/instock/job/execute_daily_job.py", line 66, in
main()
File "/data/InStock/instock/job/execute_daily_job.py", line 56, in main
bdj.main()
File "/data/InStock/instock/job/backtest_data_daily_job.py", line 98, in main
prepare()
File "/data/InStock/instock/job/backtest_data_daily_job.py", line 33, in prepare
stocks_data = stock_hist_data().get_data()
^^^^^^^^^^^^^^^^^
File "/data/InStock/instock/lib/singleton_type.py", line 18, in call
cls._instance = super(singleton_type, cls).call(*args, **kwargs) # 创建cls的对象
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/InStock/instock/core/singleton_stock.py", line 36, in init
date_start, is_cache = trd.get_trade_hist_interval(stocks[0][0]) # 提高运行效率,只运行一次
~~~~~~^^^
IndexError: list index out of range

@sofs2005
Copy link
Author

image

@sofs2005
Copy link
Author

看到日志报错了:

s 'sqlalchemy.sql.sqltypes.FLOAT'>, 'cn': '91日收益率', 'size': 100}, 'rate_92': {'type': <class 'sqlalchemy.sql.sqltypes.FLOAT'>, 'cn': '92日收益率', 'size': 100}, 'rate_93': {'type': <class 'sqlalchemy.sql.sqltypes.FLOAT'>, 'cn': '93日收益率', 'size': 100}, 'rate_94': {'type': <class 'sqlalchemy.sql.sqltypes.FLOAT'>, 'cn': '94日收益率', 'size': 100}, 'rate_95': {'type': <class 'sqlalchemy.sql.sqltypes.FLOAT'>, 'cn': '95日收益率', 'size': 100}, 'rate_96': {'type': <class 'sqlalchemy.sql.sqltypes.FLOAT'>, 'cn': '96日收益率', 'size': 100}, 'rate_97': {'type': <class 'sqlalchemy.sql.sqltypes.FLOAT'>, 'cn': '97日收益率', 'size': 100}, 'rate_98': {'type': <class 'sqlalchemy.sql.sqltypes.FLOAT'>, 'cn': '98日收益率', 'size': 100}, 'rate_99': {'type': <class 'sqlalchemy.sql.sqltypes.FLOAT'>, 'cn': '99日收益率', 'size': 100}, 'rate_100': {'type': <class 'sqlalchemy.sql.sqltypes.FLOAT'>, 'cn': '100日收益率', 'size': 100}}}策略list index out of range

2024-12-16 09:23:48,579 database.insert_other_db_from_df处理异常:cn_stock_fund_flow表(pymysql.err.DataError) (1366, "Incorrect integer value: '-' for column instockdb.cn_stock_fund_flow.fund_amount at row 1")
[SQL: INSERT INTO cn_stock_fund_flow (date, code, name, new_price, change_rate, fund_amount, fund_rate, fund_amount_super, fund_rate_super, fund_amount_large, fund_rate_large, fund_amount_medium, fund_rate_medium, fund_amount_small, fund_rate_small, change_rate_3, fund_amount_3, fund_rate_3, fund_amount_super_3, fund_rate_super_3, fund_amount_large_3, fund_rate_large_3, fund_amount_medium_3, fund_rate_medium_3, fund_amount_small_3, fund_rate_small_3, change_rate_5, fund_amount_5, fund_rate_5, fund_amount_super_5, fund_rate_super_5, fund_amount_large_5, fund_rate_large_5, fund_amount_medium_5, fund_rate_medium_5, fund_amount_small_5, fund_rate_small_5, change_rate_10, fund_amount_10, fund_rate_10, fund_amount_super_10, fund_rate_super_10, fund_amount_large_10, fund_rate_large_10, fund_amount_medium_10, fund_rate_medium_10, fund_amount_small_10, fund_rate_small_10) VALUES (%(date)s, %(code)s, %(name)s, %(new_price)s, %(change_rate)s, %(fund_amount)s, %(fund_rate)s, %(fund_amount_super)s, %(fund_rate_super)s, %(fund_amount_large)s, %(fund_rate_large)s, %(fund_amount_medium)s, %(fund_rate_medium)s, %(fund_amount_small)s, %(fund_rate_small)s, %(change_rate_3)s, %(fund_amount_3)s, %(fund_rate_3)s, %(fund_amount_super_3)s, %(fund_rate_super_3)s, %(fund_amount_large_3)s, %(fund_rate_large_3)s, %(fund_amount_medium_3)s, %(fund_rate_medium_3)s, %(fund_amount_small_3)s, %(fund_rate_small_3)s, %(change_rate_5)s, %(fund_amount_5)s, %(fund_rate_5)s, %(fund_amount_super_5)s, %(fund_rate_super_5)s, %(fund_amount_large_5)s, %(fund_rate_large_5)s, %(fund_amount_medium_5)s, %(fund_rate_medium_5)s, %(fund_amount_small_5)s, %(fund_rate_small_5)s, %(change_rate_10)s, %(fund_amount_10)s, %(fund_rate_10)s, %(fund_amount_super_10)s, %(fund_rate_super_10)s, %(fund_amount_large_10)s, %(fund_rate_large_10)s, %(fund_amount_medium_10)s, %(fund_rate_medium_10)s, %(fund_amount_small_10)s, %(fund_rate_small_10)s)]

@aimanshalou
Copy link

大哥 我连docker版本安装都不会,请教如何安装

@sofs2005
Copy link
Author

大哥 我连docker版本安装都不会,请教如何安装

按教程命令来

不过我这搭出来也不好使啊

@sofs2005 sofs2005 changed the title 为什么页面打开都是空白 页面打开都是空白的看过来 Dec 17, 2024
@sofs2005
Copy link
Author

终于发现了是系统初始化的时候少建了一张表:
CREATE TABLE IF NOT EXISTS cn_stock_attention (
datetime datetime(0) NULL DEFAULT NULL,
code varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
PRIMARY KEY (code) USING BTREE,
INDEX INIX_DATETIME(datetime) USING BTREE
) CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
大家手动建一下,再去同步一下数据,我再看看功能是不是正常

@oneyh
Copy link

oneyh commented Dec 17, 2024

终于发现了是系统初始化的时候少建了一张表: CREATE TABLE IF NOT EXISTS cn_stock_attention ( datetime datetime(0) NULL DEFAULT NULL, code varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, PRIMARY KEY (code) USING BTREE, INDEX INIX_DATETIME(datetime) USING BTREE ) CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; 大家手动建一下,再去同步一下数据,我再看看功能是不是正常

我的本来就有这张表,但是这张表中没有任何数据。好像是,他的表时动态创建的,一开始如果用不到就不创建,用到了再创建。

@sofs2005
Copy link
Author

终于发现了是系统初始化的时候少建了一张表: CREATE TABLE IF NOT EXISTS cn_stock_attention ( datetime datetime(0) NULL DEFAULT NULL, code varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, PRIMARY KEY (code) USING BTREE, INDEX INIX_DATETIME(datetime) USING BTREE ) CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; 大家手动建一下,再去同步一下数据,我再看看功能是不是正常

我的本来就有这张表,但是这张表中没有任何数据。好像是,他的表时动态创建的,一开始如果用不到就不创建,用到了再创建。

不是,这是在初始化的时候就建的基础表,建库后就是这个表

@sofs2005
Copy link
Author

今天的综合选股又空白了。。。

@q4351251
Copy link

cn_stock_attention (关注列表)表没创建,报错pymysql.err.ProgrammingError: (1146, "Table 'instockdb.cn_stock_attention' doesn't exist"), 导致个股数据的页面全都空白, 看代码初始化没有创建这个表...,按照楼主的方法手动创建该表可解决。

CREATE TABLE IF NOT EXISTS cn_stock_attention (
datetime datetime(0) NULL DEFAULT NULL,
code varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
PRIMARY KEY (code) USING BTREE,
INDEX INIX_DATETIME(datetime) USING BTREE
) CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

还是希望作者修复一下 😀

@wangsuozhu1
Copy link

综合选股一直空白,前两个星期还正常,这两个星期一直打不开,查了数据库综合选股有这张表,且数据也有,但前端就是加载不出来不知道啥原因啊

@wangsuozhu1
Copy link

pymysql.err.ProgrammingError: (1146, "Table 'instockdb.cn_stock_strategy_low_backtrace_increase' doesn't exist")
谁有这个sql 语句,只能看到这个报错

@wangsuozhu1
Copy link

今天的综合选股又空白了。。。

我也是,空白了好久了,找不到原因。。

@sofs2005
Copy link
Author

sofs2005 commented Dec 19, 2024

看日志
cn_stock_strategy_low_backtrace_increase
少这个表,也没找到定义,知道的说一下
作者能否把数据库完整的定义发一下,我觉得默认很多表都没有建起来所以导致系统白屏

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

5 participants