Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3341218
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:41:51+00:00 2026-05-18T00:41:51+00:00

I just upgraded to Pylons 1.0 and SqlAlchemy 0.6.5. What was a simple process

  • 0

I just upgraded to Pylons 1.0 and SqlAlchemy 0.6.5. What was a simple process of creating the DB schema no longer works.

I have a simple model:

Base = declarative_base()

class User(Base):
    __tablename__ = 'user'

    id = Column(Integer, primary_key=True)
    user_name = Column(String)

    def __init__(self, userName):
        self.userName = userName

    def __repr__(self):
       return "<User('%s')>" % (self.userName)

When I run

paster setup-app development.ini

the database file is created (sqlite3), but not the table, and no errors are returned.

Logging shows that the following lines in websetup.py do execute:

log.info("Creating schema...")
Base.metadata.create_all(bind = Session.bind, checkfirst = True)
log.info("Database successfully set up.")

What am I missing?

Edit: Further digging shows that the Base.metadata.tables dictionary is empty. So, why isn’t the model reflected in the metadata?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T00:41:51+00:00Added an answer on May 18, 2026 at 12:41 am

    Ok, I found the issue.

    In model.meta.py, Base = declarative_base() was already performed. When I also added that statement to the model.__init__.py, it evidently creates a new instance without the metadata, so there were no tables to create.

    I’m not clear on exactly why/how this works, so if anyone (Mike Bayer?) has details, I would love to know.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just upgraded to MATLAB 2010a. It seems that fsolve no longer works. Has
I just upgraded to iPhone SDK 3.2 Beta 4. Since doing so, I have
I just upgraded my PHP version from v5.3.1 to v5.3.9 . Suddenly class constructors
I just upgraded to the latest 4.3 Xcode. I have my plist.which is preprocessed
I just upgraded to Ubuntu 9.1 which comes with gcc 4.4.1 and I have
I just upgraded from ZF 1.7 to ZF 1.9, and almost everything works fine...
I just upgraded my Mac from Leopard to Snow Leopard and in the process
I just upgraded to Xcode 4. I have a project that is still dependent
I just upgraded to VS2008 Sp1, and I have a weird issue going on.
I just upgraded to eclipse 3.7 (indigo) and have an odd error running my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.