English 中文(简体)
Errno 5 caused througth web2py
原标题:
  • 时间:2009-12-06 12:28:11
  •  标签:
  • web2py

The I/O error errno 5 are thrown when "print" is used. I don t know why??

server: redHat

问题回答

With the built=in web server you can "print" and the output goes to console. If you use GAE instead, it redirects stdout to the socket so in effect you d print on the page itself you are generating and this will break your pages. If you use mod_wsgi stdout is closed and you cannot "print" at all. I do not know what error 5 is but it may a consequence of one these issues.

My advice is DO NOT USE print for debugging. Use logging instead.

If you post web2py-related questions on the web2py mailing list you are guaranteed a response and a much faster response time.

You can use the following code to re-assign stdout. In effect all print statements will output to the web server s error log.

import sys

sys.stdout = sys.stderr





相关问题
how can I make between query with web2py.DAL?

I m trying to make a query function that accepts two datetime.date object(start_date and end_date), and return all records with a related field that s between start_date and end_date. However, I found ...

Is Google App Engine right for me?

I am thinking about using Google App Engine.It is going to be a huge website. In that case, what is your piece of advice using Google App Engine. I heard GAE has restrictions like we cannot store ...

Django for web2py developers

Now that I ve gotten relatively familiar with web2py, I d like to give Django a go. What are the main differences? What would be the most efficient way to get started taking into account web2py ...

Errno 5 caused througth web2py

The I/O error errno 5 are thrown when "print" is used. I don t know why?? server: redHat

web2py - display radio button into my form

i want to display a radio button into my from so i did: SQLField( active ,requires=IS_IN_SET(( True , False )),widget=SQLFORM.widgets.radio.widget) but it display an error: AttributeError: ...

How to pass a JSON object to web2py using JQuery Ajax

I ve used this method in .NET to pass data back and forth between client and server using JSON objects (both ways). I really liked the method and am looking to do something similar with web2py. ...

web2py - load part of data

i have table called "type" which contains data "family,individual" i want in some pages load individual only into type drop-down and in another pages load both How can i do that?? Thanks in advance

热门标签