Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #51459
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.004 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'subject:text': 0.05; '"""': 0.07; 'subject:Error': 0.07; '__name__': 0.09; 'main()': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:set': 0.09; 'python': 0.11; 'def': 0.12; 'jan': 0.12; 'wrote': 0.14; "'__main__':": 0.16; 'main():': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'subject: \n ': 0.16; 'subject:Content': 0.16; 'subject:already': 0.16; 'apps': 0.16; 'wrote:': 0.18; 'help.': 0.21; 'command': 0.22; 'import': 0.22; 'header:User-Agent:1': 0.23; 'error': 0.23; 'headers': 0.24; 'package.': 0.24; 'subject:/': 0.26; 'header:X -Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'external': 0.29; 'am,': 0.29; 'code': 0.31; 'skip:q 20': 0.31; 'class': 0.32; 'skip:m 30': 0.32; 'running': 0.33; 'skip:# 10': 0.33; 'could': 0.34; 'something': 0.35; 'there': 0.35; 'ubuntu': 0.36; 'should': 0.36; 'error.': 0.37; 'list': 0.37; 'server': 0.38; 'skip:m 40': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'mailing': 0.39; 'received:org': 0.40; 'skip:t 30': 0.61; 'received:173': 0.61; 'status:': 0.68; 'subject': 0.69; 'skip:w 30': 0.69; '500': 0.70; 'subject:! ': 0.74; 'subject:skip:A 10': 0.78; 'url:search': 0.81; 'received:fios.verizon.net': 0.84; 'skip:/ 30': 0.84; 'subject:500': 0.84; 'subject:Internal': 0.84; 'text/plain': 0.84; 'subject:Server': 0.91; 'obtained': 0.96 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Terry Reedy <tjreedy@udel.edu> |
| Subject | Re: AssertionError: Headers already set! Status: 500 Internal Server Error Content-Type: text/plain Content-Length: 59 |
| Date | Mon, 29 Jul 2013 12:39:52 -0400 |
| References | <2cfddec4-58bf-4694-8ac4-de4f4768bc50@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Gmane-NNTP-Posting-Host | pool-173-75-251-66.phlapa.fios.verizon.net |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 |
| In-Reply-To | <2cfddec4-58bf-4694-8ac4-de4f4768bc50@googlegroups.com> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.5242.1375116004.3114.python-list@python.org> (permalink) |
| Lines | 57 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1375116004 news.xs4all.nl 15937 [2001:888:2000:d::a6]:43968 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:51459 |
Show key headers only | View raw
On 7/29/2013 8:55 AM, Jaiky wrote:
> learning web concpt in python
> wrote code in /usr/lib/cgi-bin/hello_world.py
>
> ###########################################################################
> #!/usr/bin/env python
>
> import webapp2
This is an external package.
> form ="""
> <form action="http://www/google.com/search">
> <input name="q">
> <input type="submit">
> </form>"""
>
> class MainPage(webapp2.RequestHandler):
> def get(self):
> self.response.out.write(form)
>
> class TestHandler(webapp2.RequestHandler):
> def get(self):
> q=self.request.get("q")
> self.response.out.write(q)
>
> apps = webapp2.WSGIApplication([('/', MainPage),('/testform',TestHandler)],debug=True)
>
> def main():
> apps.run()
>
> if __name__ == '__main__':
> main()
> ###############################################################################
>
> when running this code on ubuntu 12.04 using command
>
> python hello_world.py
>
> error obtained
>
> AssertionError: Headers already set!
This all comes from webapp2. You should never see assertion error.
Report to authors or ask on webapp2 mailing list if there is one.
> Status: 500 Internal Server Error
> Content-Type: text/plain
> Content-Length: 59
You should have made subject line something like
"Webapp2: AssertionError"
as only someone familiar with webapp2 could give you any help.
--
Terry Jan Reedy
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
AssertionError: Headers already set! Status: 500 Internal Server Error Content-Type: text/plain Content-Length: 59 Jaiky <jaiprakashsingh213@gmail.com> - 2013-07-29 05:55 -0700 Re: AssertionError: Headers already set! Status: 500 Internal Server Error Content-Type: text/plain Content-Length: 59 Terry Reedy <tjreedy@udel.edu> - 2013-07-29 12:39 -0400
csiph-web