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

  • Home
  • SEARCH
  • 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 915377
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T17:52:38+00:00 2026-05-15T17:52:38+00:00

Having the following error AttributeError: ‘NoneType’ object has no attribute ‘sa_engine’ on this line

  • 0

Having the following error AttributeError: ‘NoneType’ object has no attribute ‘sa_engine’

on this line in model/init.py


Session = scoped_session(sessionmaker(autoflush=True, autocommit=False, 
bind=config['pylons.g'].sa_engine))

When printing config dictionary, it has ‘pylons.g’ key but value at this key is None.

I do not understand why it is None, config[‘pylons.g’] is initialized in environment.py as

config['pylons.g'] = app_globals.Globals()

Any ideas?

By the way, initially there no config[‘pylons.g’] code in the project. It was config[‘pylons.app_globals’] but when I tried to use it, it was not in dictionary at all.

  • 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-15T17:52:39+00:00Added an answer on May 15, 2026 at 5:52 pm

    I would recommend against binding the session at import time. Do it inside init_model() instead:

    def init_model(engine):
        meta.Session.configure(bind=engine)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 536k
  • Answers 536k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The MidiSystem.getMidiDeviceInfo() gets the full providers list, and extracts the… May 17, 2026 at 1:25 am
  • Editorial Team
    Editorial Team added an answer Encosia has an excellent sample at http://encosia.com/2008/10/04/using-jquery-to-enhance-aspnet-ajax-progress-indication/ that describes how… May 17, 2026 at 1:25 am
  • Editorial Team
    Editorial Team added an answer In your second TextView, change android:layout_alignParentRight="true" to android:layout_toRightOf="@+id/nameText" May 17, 2026 at 1:25 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I'm currently having following error message when executing a .sql file with about 26MB
I'm having trouble with the following code: def get_module(mod_path): mod_list = mod_path.split('.') mod =
I am very new to asp and having following problem I am getting 2
I'm getting the following error when I attempt to compile my XCode project to
The following problem has been fixed, I added an 's' to the end of
Hey I have a windows server running python CGI scripts and I'm having a
I am having a few problems loading a table into the designer. I get
I'm having alot of trouble with my code. When I compile I get the
I am having some problem in installing my app on the iphone as I
I am having an inconsistent issue being produced on one of my servers whereby

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.