question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

sqlalchemy.engine.reflection.Inspector.get_columns : documentation error for SQLAlchemy 1.2.0b1

See original GitHub issue

Migrated issue, originally created by Rudolf Cardinal (@RudolfCardinal)

In SQLAlchemy 1.2.0b1, it’s possible for sqlalchemy.engine.reflection.Inspector.get_columns to return the following dict as one of its results:

{
    'type': VARCHAR(length=255),
    'nullable': False,
    'default': None,
    'name': 'device_id',
    'comment': 'Source tablet device ID'
}

The docs at http://docs.sqlalchemy.org/en/latest/core/reflection.html#sqlalchemy.engine.reflection.Inspector.get_columns seem to be out of date for this in that (a) attrs is documented as part of the returned dictionary, but is absent in this real example; (b) comment is new and undocumented.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
zzzeekcommented, Jan 22, 2020

you can add “Fixes: #4051” to that PR’s commit message

0reactions
sqla-testercommented, Mar 15, 2020

Federico Caselli has proposed a fix for this issue in the rel_1_3 branch:

Support inspection of computed column https://gerrit.sqlalchemy.org/c/sqlalchemy/sqlalchemy/+/1796

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reflecting Database Objects - SQLAlchemy 1.4 Documentation
Raises NotImplementedError for a dialect that does not support comments. New in version 1.2. method sqlalchemy.engine.reflection.Inspector.
Read more >
Error Messages — SQLAlchemy 1.2 Documentation
Error Messages¶. This section lists descriptions and background for common error messages and warnings raised or emitted by SQLAlchemy.
Read more >
Error Messages - SQLAlchemy 1.4 Documentation
Object cannot be converted to 'persistent' state, as this identity map is no longer valid. AsyncIO Exceptions. AwaitRequired; MissingGreenlet; No Inspection ...
Read more >
1.2 Changelog — SQLAlchemy 2.0 Documentation
Fixed bug in PostgreSQL ENUM reflection where a case-sensitive, quoted name would be reported by the query including quotes, which would not match...
Read more >
Runtime Inspection API — SQLAlchemy 1.4 Documentation
The inspection module provides the inspect() function, which delivers ... of the registered inspection type for the given object, such as if an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found