V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
wayto134
V2EX  ›  问与答

新人请教 V2EX 的各位大神

  •  
  •   wayto134 · 2017-11-24 11:33:46 +08:00 · 1306 次点击
    这是一个创建于 2558 天前的主题,其中的信息可能已经有所发展或是发生改变。
    A 软件由公司一个已离职的大神开发( Python ),A 软件连接公司内部服务器进行使用。本人非程序员,不懂服务器数据库,经过尝试,A 软件可以正常连接我购买的服务器数据库,但在软件内进行上传操作时候,出现以下失败提示。个人排除服务器(搬瓦工)连接原因,考虑是数据库没有对应目录导致。

    请问各位大神:
    1、是否因为数据库内没有对应目录导致?
    2、如果是目录原因,数据库目录只能通过离职大神获取吗,有其他办法吗?

    错误提示:
    Exception in thread Thread-1:
    Traceback (most recent call last):
    File "threading.pyo", line 810, in __bootstrap_inner
    File "tool\bdgjcexcel.pyo", line 143, in run
    File "sqlalchemy\orm\session.pyo", line 652, in begin
    File "sqlalchemy\orm\session.pyo", line 161, in __init__
    File "sqlalchemy\orm\session.pyo", line 238, in _take_snapshot
    File "sqlalchemy\orm\session.pyo", line 1818, in flush
    File "sqlalchemy\orm\session.pyo", line 1936, in _flush
    File "sqlalchemy\util\langhelpers.pyo", line 58, in __exit__
    File "sqlalchemy\orm\session.pyo", line 1900, in _flush
    File "sqlalchemy\orm\unitofwork.pyo", line 372, in execute
    File "sqlalchemy\orm\unitofwork.pyo", line 525, in execute
    File "sqlalchemy\orm\persistence.pyo", line 64, in save_obj
    File "sqlalchemy\orm\persistence.pyo", line 569, in _emit_insert_statements
    File "sqlalchemy\engine\base.pyo", line 662, in execute
    File "sqlalchemy\engine\base.pyo", line 761, in _execute_clauseelement
    File "sqlalchemy\engine\base.pyo", line 874, in _execute_context
    File "sqlalchemy\engine\base.pyo", line 1024, in _handle_dbapi_exception
    File "sqlalchemy\util\compat.pyo", line 196, in raise_from_cause
    File "sqlalchemy\engine\base.pyo", line 867, in _execute_context
    File "sqlalchemy\engine\default.pyo", line 324, in do_execute
    File "MySQLdb\cursors.pyo", line 201, in execute
    File "MySQLdb\connections.pyo", line 36, in defaulterrorhandler
    OperationalError: (OperationalError) (2013, 'Lost connection to MySQL server during query') 'INSERT INTO bdsem (date, zh, jh, gjc, zx, dj, xf, pm, ssc, zly, dh, yy, dz) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)' (datetime.datetime(2015, 9, 22, 0, 0), u'gz-\u5973\u5b50\u533b\u9662', u'\u5987\u79d1-\u9634\u9053\u75be\u75c5-\u708e\u75c7', u'\u5916\u9634\u4e0a\u957f\u7599\u7629', 1, 0, 0.0, 1.0, u'', u'', 0, 0, 0)
    1 条回复    2017-11-24 11:49:56 +08:00
    coderluan
        1
    coderluan  
       2017-11-24 11:49:56 +08:00
    关键点就是这句话“ Lost connection to MySQL server during query'”,反应过去就是失去链接了,你又排除了服务器,那样一般来说就是发送给了不正确或者太大的 query 导致的,接下来的话,你不是程序员基本搞不定啊,去找你们领导吧,让他搞定,找哪个程序员是他的问题了。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2595 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 15:42 · PVG 23:42 · LAX 07:42 · JFK 10:42
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.