ph87 / django-logging

Automatically exported from code.google.com/p/django-logging
0 stars 0 forks source link

django logging raises IOError #33

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. start server with manage.py runserver
2. go with browser to web page
3.

What is the expected output? What do you see instead?
Webpage expected
Django errorlog instead

What version of the product are you using? On what operating system?
Trunk

Please provide any additional information below.
The code works fine on WIN32
When deploying to test server under Debian and Python 2.5 it chrashes when
django-logging is enabled.

I could it trace back to 

middleware.py
163: source_lines = inspect.getsourcelines(frame)

It seems it calls a frame object recursively and after the 4th time calling
the same it chrashes.
I put a print statement just before that line to check - no debuuger at
this time. That what I got.
 Frame <frame object at 0x8669f9c>
 Frame <frame object at 0x86deed4>
 Frame <frame object at 0x86deed4>
 Frame <frame object at 0x86deed4>
 Frame <frame object at 0x86deed4>
-> Boing, Crash, Bang .....

I did delete all pycs, got the same inspect file as on my development
server -> nada 
Any Idea

Original issue reported on code.google.com by guenter....@wanagu.at on 9 Feb 2009 at 12:06

GoogleCodeExporter commented 9 years ago
I appear to be having a similar problem on Fedora 8 with Python 2.5.1 on the 
latest trunk of djangologging.  
After installing djangologging middleware, an exception that I am catching and 
e-mailing to myself (the trapped 
exception doesn't get thrown to the user), I am getting "could not get source 
code" which indicates an issue with 
inspect.  I have also tried deleting all .pyc files and saw no positive result.

Original comment by ryates100 on 13 Feb 2009 at 4:22

GoogleCodeExporter commented 9 years ago
I have just added a fix for issue 26 which makes thinks work better with 
symlinked
code. In case this has inadvertently solved your problems, could you please 
update to
the latest trunk version of django-logging and try again?

If you are still having problems, could you please post a traceback of the 
issue?
This will help track down exactly where the issue lies.

Original comment by fras...@gmail.com on 15 Feb 2009 at 7:53

GoogleCodeExporter commented 9 years ago
Problem is still there. 

Traceback can be found at http://www.dpaste.com/155/. 

Thank you
Günter

Original comment by guenter....@wanagu.at on 23 Feb 2009 at 5:31

GoogleCodeExporter commented 9 years ago
I'm also having this issue (all of a sudden).
http://paste2.org/p/345966

Yesterday I made the switch from using had-rolled lrp's and crons to using 
celery. 
Celery worked great in a little stand-alone django app I built to test it, but 
when I
integrated it with my main project (which was already making use of 
djangologging), I
get the IOError on pages that make use of the system.

Original comment by onelson@gmail.com on 28 Jul 2009 at 2:21

GoogleCodeExporter commented 9 years ago
Yeah, I didn't get it at first, but it makes sense now.  I guess before today I 
had
source files in my path for every lib I was importing.  Wanted to add a note 
here
trying this and http://code.google.com/p/django-logging/issues/detail?id=36 
together
since it smoothed my issue over quite nicely (I even get my celery logs 
displayed!)

Original comment by onelson@gmail.com on 28 Jul 2009 at 2:49