使用sqlalchemy连接到Windows上的firebird超级服务器

时间:2013-04-29 09:50:47

标签: python sqlalchemy firebird

我正在尝试连接到firebird超级服务器。我安装了fdb软件包。

我正在尝试

from sqlalchemy import create_engine

engine = create_engine ('localhost:c:\fdbb\school.fdb')

我收到此错误

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "build\bdist.win32\egg\sqlalchemy\engine\__init__.py", line 332, in creat
e_engine
  File "build\bdist.win32\egg\sqlalchemy\engine\strategies.py", line 48, in crea
te
  File "build\bdist.win32\egg\sqlalchemy\engine\url.py", line 154, in make_url
  File "build\bdist.win32\egg\sqlalchemy\engine\url.py", line 196, in _parse_rfc
1738_args
sqlalchemy.exc.ArgumentError: Could not parse rfc1738 URL from string 'localhost
:c:♀dbb\school.fdb'

我这样做了吗?。

1 个答案:

答案 0 :(得分:3)

解决这个问题

import sqlalchemy
import fdb
  

engine =   create_engine( '火鸟+ FDB:// SYSDBA:masterkey @本地:3050 / C:/fdbb/school.fdb')