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 3998572
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T07:32:32+00:00 2026-05-20T07:32:32+00:00

I am trying to include external python module in my project for working with

  • 0

I am trying to include external python module in my project for working with sessions. It’s named gmemsess.py. It tries to add Set-Cookie header in the response and an error appears:

rh.response.headers.add_header('Set-Cookie','%s=%s; path=/;'%(name,self._sid))
AttributeError: HeaderDict instance has no attribute 'add_header'

I read documentation and everything seems ok, but it doesn’t work. Why this error can appear?
Also, I use webapp2 to manage subdomains. May be there is something goes wrong because of this?

  • 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-20T07:32:33+00:00Added an answer on May 20, 2026 at 7:32 am

    The headers.add_header method should absolutely work if you are using stock AppEngine, but I am guessing that you are using a framework — and there are plenty of them, like Bottle — that uses a custom replacement for webob’s Response object.

    A little bit of time with Google reveals that there is at least one identifiable class called HeaderDict that extends MultiDict, and I think that is what you are dealing with. In that case, you should to into gmemsess.py and change the line

    rh.response.headers.add_header('Set-Cookie','%s=%s; path=/;'%(name,self._sid))
    

    to read

    rh.response.headers['Set-Cookie'] = '%s=%s; path=/;'%(name,self._sid)
    

    That should fix you right up.

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

Sidebar

Related Questions

I'm trying to import a set of coordinates from an external javascript. I have
I'm just trying to compile the hello world example of boost.python WITHOUT using all
I'm trying to enumerate files through the Windos 7 library API, e.g. with SHLoadLibraryFromKnownFolder
I'm trying to compile an SFML program I've writting in Visual C++ 2010. It
So I am trying to use FullCalendar and jQuery UI dialog box. And i'm
I'm trying to build a bookmarklette. I want to minimize the size of the
I am trying to implement a leftist tree using heaps as a base class.
I just have a problem that I have been trying to fix for the
As an experiment i am trying to write the following program which allows me
I'm a pretty seasoned programmer but I'm just now diving into C++ and it's...

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.