3

我正在尝试连接到 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'

我这样做对吗?

4

1 回答 1

4

这样解决了

import sqlalchemy
import fdb

engine = create_engine('firebird+fdb://sysdba:masterkey@localhost:3050/c:/fdbb/school.fdb')

于 2013-04-29T10:55:30.780 回答