web2py firebird db连接失败

时间:2016-01-11 14:39:55

标签: python firebird web2py

我尝试将web2py应用程序连接到另一台服务器中的firebird数据库。

这是输出消息:

  

票证ID   127.0.0.1.2016-01-11.12-27-33.cdefb9f6-3cc5-46ce-85dc-a2a12220e7f6

     

无法连接,尝试了5次:   Traceback(最近一次调用最后一次):文件   “/home/filhofilha/Documents/Deployment/Web2Py/web2py/gluon/packages/dal/pydal/base.py”   第435行,在 init self._adapter = ADAPTERSself._dbname中   文件   “/home/filhofilha/Documents/Deployment/Web2Py/web2py/gluon/packages/dal/pydal/adapters/base.py”   第53行,在调用 obj = super(AdapterMeta,cls)。调用(* args,   ** kwargs)文件“/home/filhofilha/Documents/Deployment/Web2Py/web2py/gluon/packages/dal/pydal/adapters/firebird.py”,   第121行,在 init 中,如果是do_connect:self.reconnect()文件   “/home/filhofilha/Documents/Deployment/Web2Py/web2py/gluon/packages/dal/pydal/connection.py”   第105行,重新连接self.connection = f()文件   “/home/filhofilha/Documents/Deployment/Web2Py/web2py/gluon/packages/dal/pydal/adapters/firebird.py”   第119行,在连接器中返回self.driver.connect(** driver_args)文件   “/home/filhofilha/Documents/Deployment/Web2Py/web2py/gluon/contrib/pypyodbc.py”   第2434行,在 init self.connect(connectString,autocommit,ansi,   timeout,unicode_results,readonly)文件   “/home/filhofilha/Documents/Deployment/Web2Py/web2py/gluon/contrib/pypyodbc.py”   第2483行,连接check_success(self,ret)文件   “/home/filhofilha/Documents/Deployment/Web2Py/web2py/gluon/contrib/pypyodbc.py”   第988行,在check_success ctrl_err中(SQL_HANDLE_DBC,ODBC_obj.dbc_h,   ret,ODBC_obj.ansi)文件   “/home/filhofilha/Documents/Deployment/Web2Py/web2py/gluon/contrib/pypyodbc.py”   第964行,在ctrl_err中引发错误(state,err_text)错误:(u'IM012',   u'[IM012] [unixODBC] [Driver Manager] DRIVER关键字语法错误')

我的代码:

dbExternal = DAL('firebird://user:password@localhost/C:\\DB.FDB', migrate_enabled=False)

我该如何解决?

由于

1 个答案:

答案 0 :(得分:2)

我错过了python firebird驱动程序。我安装它来纠正我的问题