sqlalchemy.exceptions.NoSuchTableError: RDB$PAGES

Issue #796 resolved
Former user created an issue

When I do: metadata = sqla.MetaData(engine, reflect=True)

I get the following exception: Traceback (most recent call last): File "test.py", line 5, in <module> metadata = sqla.MetaData(engine, reflect=True) File "build\bdist.win32\egg\sqlalchemy\schema.py", line 1058, in init File "build\bdist.win32\egg\sqlalchemy\schema.py", line 1200, in reflect File "build\bdist.win32\egg\sqlalchemy\schema.py", line 114, in call File "build\bdist.win32\egg\sqlalchemy\engine\base.py", line 1178, in reflecttable File "build\bdist.win32\egg\sqlalchemy\databases\firebird.py", line 237, in reflecttable sqlalchemy.exceptions.NoSuchTableError: RDB$PAGES

I am new to Sqlalchemy, so I might be doing something wrong.

Werner

P.S. This is with 0.4.0beta6 on Windows with FB 2.0

Comments (6)

  1. Mike Bayer repo owner
    • assigned issue to

    we'll have to get one of our firebird users to test this. the "MetaData" reflect is a very new feature so I don't think its ever been properly implemented for Firebird. As a workaround, you can create individual Table objects and use autoload=True on those.

    Roger, im sending this to you if you have the time/inclination to test it out.

  2. Former user Account Deleted

    werner, you are not doing anything wrong.

    The problem is that MetaData(..., reflect=True) is trying to reflect Firebird's system tables... which it shouldn't.

    I'll fix it soon...

  3. Former user Account Deleted

    Ok... I still have to fix some reflection issues with Firebird, but if you are in a hurry, you can make this little change in your databases\firebird.py :

    Locate the table_names(self, connection, schema) function and change its SQL to:

    SELECT R.RDB$RELATION_NAME FROM RDB$RELATIONS R WHERE R.RDB$SYSTEM_FLAG=0
    
  4. Former user Account Deleted

    Roger,

    Thanks for the quick fix.

    I just downloaded it and as far as I can see it works fine.

    Thanks Werner

  5. Log in to comment