Re: python syntax errors
On 29-Aug-06, at 6:46 PM, Jay Parlar wrote: >> in idle). Even if it does compile, if some import errors are there, >> again you will not get the error - just the script headers thing > > There are lots and lots of potential runtime errors that wouldn't be > caught. Just running your stuff in IDLE is not enough. it is not enough - but it is the first thing to do. Idle will allow errors within loops that are not executed for example. Next would be to run manage.py validate. This will take care of 95% of all newbie errors. -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/web/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: python syntax errors
On 8/29/06, Ilia Kantor <[EMAIL PROTECTED]> wrote: > And people here tell me set admin email.. So I will get emails with errors > WHILE I DEVELOP on my home box! > *rofl* > > Maybe django redirects stdout/stderr somewhere so the errors get consumed ? It wouldn't be Django redirecting, it would be mod_python. And yes, having to get emails while you develop is silly. That's why I recommend using the dev server. Then you see the errors, immediately, right on screen, without having to run 'tail' on an error log or anything. When you're 100% happy with how it runs with the dev server, start testing with Apache. Jay P. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: python syntax errors
On 8/28/06, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > if there are syntax errors, the file will not compile and the only > error apache will give is incomplete script headers or something like > that. So before running with apache, make sure the file compiles (F5 > in idle). Even if it does compile, if some import errors are there, > again you will not get the error - just the script headers thing There are lots and lots of potential runtime errors that wouldn't be caught. Just running your stuff in IDLE is not enough. > > > > Save Apache for final deployment. > > no harm in using it for development - that way both devel and > production are on identical platforms I certainly wasn't advocating doing ALL your development *and* testing with the Django server, and then switching to Apache for production. My recommendation is to do all your main development with the Django server. When you're completely happy with how it runs, start testing with Apache. When you're happy with how that runs, switch to production. Jay P. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: python syntax errors
> if there are syntax errors, the file will not compile and the only > error apache will give is incomplete script headers or something like > that. So before running with apache, make sure the file compiles (F5 > in idle). Even if it does compile, if some import errors are there, > again you will not get the error - just the script headers thing Wait, wait.. When the error occurs, message is GENERATED. it should not be consumed, but saved somewhere. Better go apache log... And people here tell me set admin email.. So I will get emails with errors WHILE I DEVELOP on my home box! *rofl* Maybe django redirects stdout/stderr somewhere so the errors get consumed ? > > > Save Apache for final deployment. > > no harm in using it for development - that way both devel and > production are on identical platforms I too can't understand why I shouldn't develop on apache. Usually people recommend use same env for development and production. Less weak points. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: python syntax errors
On 28-Aug-06, at 10:46 PM, Jay Parlar wrote: >> >> When I have syntax error in python code of an app, where it goes ? >> >> I'm working under apache, same config as production, but >> MaxRequestsPerChild 1 >> >> There are no syntax errors in apache error log or site error log. >> What's up ? > > I don't remember where they go when running with Apache, but why not > use the development server when doing your *development*? Then you see > all the errors, and it *quickly* auto-reloads when you change files, > etc. etc. if there are syntax errors, the file will not compile and the only error apache will give is incomplete script headers or something like that. So before running with apache, make sure the file compiles (F5 in idle). Even if it does compile, if some import errors are there, again you will not get the error - just the script headers thing > > Save Apache for final deployment. no harm in using it for development - that way both devel and production are on identical platforms -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/web/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: python syntax errors
no, I did not care about it yet. I'm under Gentoo box w/ sendmail wrapper > On 8/28/06, Ilia Kantor <[EMAIL PROTECTED]> wrote: > > my settings.py starts with > > > > DEBUG = True > > TEMPLATE_DEBUG = DEBUG > > Are you listed in ADMINS? Is your system properly configured to send > email? (ie.on my setup, I needed to configure the EMAIL_HOST and > SERVER_EMAIL options). > > Jay P. > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: python syntax errors
On 8/28/06, Ilia Kantor <[EMAIL PROTECTED]> wrote: > > my settings.py starts with > > DEBUG = True > TEMPLATE_DEBUG = DEBUG > Are you listed in ADMINS? Is your system properly configured to send email? (ie.on my setup, I needed to configure the EMAIL_HOST and SERVER_EMAIL options). Jay P. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: python syntax errors
my settings.py starts with DEBUG = True TEMPLATE_DEBUG = DEBUG > On 8/28/06, Ilia Kantor <[EMAIL PROTECTED]> wrote: > > After all, I think such behavior ("eating" errors) is simply wrong. > > I want track errors from logs after deployment, because fixes on live > > server should be possible. > > When the 'DEBUG' setting is False, Django will email tracebacks of any > errors to all the people listed in the 'ADMINS' setting. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: python syntax errors
On 8/28/06, Ilia Kantor <[EMAIL PROTECTED]> wrote: > > > I have single static IP on my home host, and 80 port is occupied by apache. > I'm very satisfied by dev process using it. > > After all, I think such behavior ("eating" errors) is simply wrong. > I want track errors from logs after deployment, because fixes on live server > should be possible. I believe there's a system that all uncaught exceptions will be mailed to the users listed in ADMIN. And FYI, the development server runs on port 8000 by default, and you can have it run on any port you wish. Jay P. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Re: python syntax errors
On 8/28/06, Ilia Kantor <[EMAIL PROTECTED]> wrote: > After all, I think such behavior ("eating" errors) is simply wrong. > I want track errors from logs after deployment, because fixes on live server > should be possible. When the 'DEBUG' setting is False, Django will email tracebacks of any errors to all the people listed in the 'ADMINS' setting. -- "May the forces of evil become confused on the way to your house." -- George Carlin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: python syntax errors
I have single static IP on my home host, and 80 port is occupied by apache. I'm very satisfied by dev process using it. After all, I think such behavior ("eating" errors) is simply wrong. I want track errors from logs after deployment, because fixes on live server should be possible. > On 8/28/06, Ilia Kantor <[EMAIL PROTECTED]> wrote: > > When I have syntax error in python code of an app, where it goes ? > > > > I'm working under apache, same config as production, but > > MaxRequestsPerChild 1 > > > > There are no syntax errors in apache error log or site error log. > > What's up ? > > I don't remember where they go when running with Apache, but why not > use the development server when doing your *development*? Then you see > all the errors, and it *quickly* auto-reloads when you change files, > etc. etc. > > Save Apache for final deployment. > > Jay P. > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: python syntax errors
If you run On 8/28/06, Jay Parlar <[EMAIL PROTECTED]> wrote: > > On 8/28/06, Ilia Kantor <[EMAIL PROTECTED]> wrote: > > > > > > When I have syntax error in python code of an app, where it goes ? > > > > I'm working under apache, same config as production, but > > MaxRequestsPerChild 1 > > > > There are no syntax errors in apache error log or site error log. > > What's up ? > > I don't remember where they go when running with Apache, Normally such errors show up in the error log file apache (e.g.: /var/log/appache/errors.log). Martin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: python syntax errors
On 8/28/06, Ilia Kantor <[EMAIL PROTECTED]> wrote: > > > When I have syntax error in python code of an app, where it goes ? > > I'm working under apache, same config as production, but MaxRequestsPerChild 1 > > There are no syntax errors in apache error log or site error log. > What's up ? I don't remember where they go when running with Apache, but why not use the development server when doing your *development*? Then you see all the errors, and it *quickly* auto-reloads when you change files, etc. etc. Save Apache for final deployment. Jay P. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
python syntax errors
When I have syntax error in python code of an app, where it goes ? I'm working under apache, same config as production, but MaxRequestsPerChild 1 There are no syntax errors in apache error log or site error log. What's up ? How should I setup things ? my vhost -- ServerName mysite.ru ErrorLog /var/site/mysite/logs/error.log CustomLog /var/site/mysite/logs/access.log combined DocumentRoot /var/site/mysite/www LogLevel debug SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE mysite.settings PythonDebug On PythonPath "['/var/site'] + sys.path" # Exceptions from the mod_python hooked onto '/' SetHandler None --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---