On Wed, May 5, 2021, at 11:18 AM, Yaakov Bressler wrote: > *But when I try generating documentation for the entire project > **(`MODULE='.'`)**, I get the following error:* > > ImportError: Error importing 'PROJECT_NAME.database': > InvalidRequestError: Table 'FooBar' is already defined for this MetaData > instance. Specify 'extend_existing=True' to redefine options and columns on > an existing Table object. > > > What makes this error odd is that I have a full testing suite where there are > no issues at all. Further, the error occurs in database.__init__.py which > just doesn't make sense to me at all. > > **Is it possible that my models are attempted to be created twice by pydoc > when called from the root?** >
it certainly seems that way. Try putting a pdb.set_trace() inside of *database.models.model.py *and see if it's called twice.** -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/21bd26e8-b15e-4ec1-9031-c3dc15823c00%40www.fastmail.com.