VeighNa量化社区
你的开源社区量化交易平台
Member
avatar
加入于:
帖子: 22
声望: 0

ProgrammingError: (pymysql.err.ProgrammingError) (1146, "Table 'vnpy.dbbardata' doesn't exist")
[SQL: SELECT * FROM dbbardata]
(Background on this error at: http://sqlalche.me/e/13/f405)

Member
avatar
加入于:
帖子: 22
声望: 0

from sqlalchemy import create_engine
engine = create_engine("mysql+pymysql://root:3039wyh12345678@127.0.0.1:3306/vnpy")
df = pd.read_sql(query, engine)

Output exceeds the size limit. Open the full output data in a text editor

ProgrammingError Traceback (most recent call last)
File c:\veighna_studio\lib\site-packages\sqlalchemy\engine\base.py:1276, in Connection._execute_context(self, dialect, constructor, statement, parameters, *args)
1275 if not evt_handled:
-> 1276 self.dialect.do_execute(
1277 cursor, statement, parameters, context
1278 )
1280 if self._has_events or self.engine._has_events:

File c:\veighna_studio\lib\site-packages\sqlalchemy\engine\default.py:608, in DefaultDialect.do_execute(self, cursor, statement, parameters, context)
607 def do_execute(self, cursor, statement, parameters, context=None):
--> 608 cursor.execute(statement, parameters)

File ~\AppData\Roaming\Python\Python310\site-packages\pymysql\cursors.py:148, in Cursor.execute(self, query, args)
146 query = self.mogrify(query, args)
--> 148 result = self._query(query)
149 self._executed = query

File ~\AppData\Roaming\Python\Python310\site-packages\pymysql\cursors.py:310, in Cursor._query(self, q)
309 self._clear_result()
--> 310 conn.query(q)
311 self._do_get_result()

File ~\AppData\Roaming\Python\Python310\site-packages\pymysql\connections.py:548, in Connection.query(self, sql, unbuffered)
547 self._execute_command(COMMAND.COM_QUERY, sql)
...
--> 143 raise errorclass(errno, errval)

ProgrammingError: (pymysql.err.ProgrammingError) (1146, "Table 'vnpy.dbbardata' doesn't exist")
[SQL: SELECT * FROM dbbardata]
(Background on this error at: http://sqlalche.me/e/13/f405)

Member
avatar
加入于:
帖子: 1509
声望: 109

这个报错感觉来源于数据库驱动层面,一次读取的数据太多超过允许的上限了,缩短下范围试试吧

Member
avatar
加入于:
帖子: 22
声望: 0

怎么样缩短范围呢

Member
avatar
加入于:
帖子: 716
声望: 62

这一节课是使用mysql数据库的使用,包括csv数据导入mysql和从mysql读取数据,报错Table 'vnpy.dbbardata' doesn't exist,表示dbbardata数据表不存在,确认一下csv数据是否正常写入mysql数据库

Member
avatar
加入于:
帖子: 22
声望: 0

Output exceeds the size limit. Open the full output data in a text editor

Member
avatar
加入于:
帖子: 22
声望: 0

这个是什么原因

Member
avatar
加入于:
帖子: 22
声望: 0

ImportError: Unable to find a usable engine; tried using: 'sqlalchemy'.
A suitable version of sqlalchemy is required for sql I/O support.
Trying to import the above resulted in these errors:

  • Pandas requires version '1.4.0' or newer of 'sqlalchemy' (version '1.3.24' currently installed).
Member
avatar
加入于:
帖子: 22
声望: 0

这个错误是咋回事

Member
avatar
加入于:
帖子: 1509
声望: 109

这个报错是找不到数据库驱动,建议自己尝试安装下更低版本的pandas吧

Member
avatar
加入于:
帖子: 125
声望: 4

报错原因是你的表不存在。检查数据是否存在的直观方法是打开你的图形用户界面。启动登录VeighNa Station后,点击交易按钮,进入数据管理模块,通过图形界面能看到目前已经导入数据库的数据。

© 2015-2022 上海韦纳软件科技有限公司
备案服务号:沪ICP备18006526号

沪公网安备 31011502017034号

【用户协议】
【隐私政策】
【免责条款】