ph87 / django-logging

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

"could not get source code" #48

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
* What steps will reproduce the problem?

Enable dajngologging according to docs

* Please provide any additional information below.

Environment:

Request Method: GET
Request URL: http://127.0.0.1:8000/pastes/mine/
Django Version: 1.1.1
Python Version: 2.6.1
Installed Applications:
['django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'tagging',
 'registration',
 'djangologging',
 'django_extensions',
 'PastyPaste.accounts',
 'PastyPaste.pastes']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'djangologging.middleware.LoggingMiddleware',
 'djangologging.middleware.SuppressLoggingOnAjaxRequestsMiddleware')

Traceback:
File
"/Users/jmoreira/Develop/Python/site-packages/djangologging/middleware.py"
in append
  150.             logging.getLogger().log(logging.SQL, object['sql'])
File
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/logging/
__init__.py"
in log
  1084.             self._log(level, msg, args, **kwargs)
File
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/logging/
__init__.py"
in _log
  1128.         record = self.makeRecord(self.name, level, fn, lno, msg,
args, exc_info, func, extra)
File
"/Users/jmoreira/Develop/Python/site-packages/djangologging/middleware.py"
in make_sql_record
  137.         rv = original_makeRecord(self, *args, **kwargs)
File
"/Users/jmoreira/Develop/Python/site-packages/djangologging/middleware.py"
in enhanced_make_record
  162.     source_lines = inspect.getsourcelines(frame)
File
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/inspect.
py"
in getsourcelines
  683.     lines, lnum = findsource(object)
File
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/inspect.
py"
in findsource
  531.         raise IOError('could not get source code')

Exception Type: IOError at /pastes/mine/
Exception Value: could not get source code

Apple_PubSub_Socket_Render      
'/tmp/launch-y1vBET/Render'
COMMAND_MODE    
'unix2003'
CONTENT_LENGTH  
''
CONTENT_TYPE    
'text/plain'
DISPLAY     
'/tmp/launch-03BJP2/:0'
DJANGO_SETTINGS_MODULE  
'PastyPaste.settings'
GATEWAY_INTERFACE   
'CGI/1.1'
HOME    
'/Users/jmoreira'
HTTP_ACCEPT     
'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
HTTP_ACCEPT_CHARSET     
'ISO-8859-1,utf-8;q=0.7,*;q=0.7'
HTTP_ACCEPT_ENCODING    
'gzip,deflate'
HTTP_ACCEPT_LANGUAGE    
'pt,en-us;q=0.7,en;q=0.3'
HTTP_CACHE_CONTROL  
'max-age=0'
HTTP_CONNECTION     
'keep-alive'
HTTP_COOKIE     
'__utma=96992031.2018515298956187100.1242841406.1242841406.1242841406.1;
sessionid=203c2ec0e67d142d33aae5e73d5e4e08'
HTTP_HOST   
'127.0.0.1:8000'
HTTP_KEEP_ALIVE     
'115'
HTTP_REFERER    
'http://127.0.0.1:8000/account/login/'
HTTP_USER_AGENT     
'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2)
Gecko/20100115 Firefox/3.6'
INFOPATH    
'/sw/share/info:/sw/info:/usr/share/info'
LANG    
'pt_PT.UTF-8'
LOGNAME     
'jmoreira'
MANPATH     
'/sw/share/man:/usr/share/man:/usr/local/share/man:/usr/X11/man:/sw/lib/perl5/5.
10.0/man:/usr/X11R6/man'
OLDPWD  
'/Users/jmoreira'
PATH    
'/sw/bin:/sw/sbin:/Applications/MAMP/Library/bin/:/Library/PostgreSQL/8.4/bin/:/
Users/jmoreira/Develop/apache-maven-2.2.1/bin/:/usr/bin:/bin:/usr/sbin:/sbin:/us
r/local/bin:/usr/X11/bin:/Users/jmoreira/Develop/Frameworks/grails-1.2.0/bin:/us
r/X11R6/bin'
PATH_INFO   
u'/pastes/mine/'
PERL5LIB    
'/sw/lib/perl5:/sw/lib/perl5/darwin'
PWD     
'/Users/jmoreira/PastyPaste'
PYTHONPATH  
'/Users/jmoreira/Develop/Python/site-packages'
QUERY_STRING    
''
REMOTE_ADDR     
'127.0.0.1'
REMOTE_HOST     
''
REQUEST_METHOD  
'GET'
RUN_MAIN    
'true'
SCRIPT_NAME     
u''
SERVER_NAME     
'activate.adobe.com'
SERVER_PORT     
'8000'
SERVER_PROTOCOL     
'HTTP/1.1'
SERVER_SOFTWARE     
'WSGIServer/0.1 Python/2.6.1'
SHELL   
'/bin/bash'
SHLVL   
'1'
SSH_AUTH_SOCK   
'/tmp/launch-G1CWn0/Listeners'
TERM    
'xterm-color'
TERM_PROGRAM    
'Apple_Terminal'
TERM_PROGRAM_VERSION    
'272'
TMPDIR  
'/var/folders/qk/qkzrn3pUGLGikXs87QahiU+++TI/-Tmp-/'
TZ  
'Europe/Lisbon'
USER    
'jmoreira'
VERSIONER_PERL_PREFER_32_BIT    
'yes'
VERSIONER_PYTHON_PREFER_32_BIT  
'yes'
VERSIONER_PYTHON_VERSION    
'2.6'
_   
'./manage.py'
__CF_USER_TEXT_ENCODING     
'0x1F5:0:10'
wsgi.errors     
<open file '<stderr>', mode 'w' at 0x1700c0>
wsgi.file_wrapper   
<class 'django.core.servers.basehttp.FileWrapper'>
wsgi.input  
<socket._fileobject object at 0x1269d70>
wsgi.multiprocess   
False
wsgi.multithread    
True
wsgi.run_once   
False
wsgi.url_scheme     
'http'
wsgi.version    
(1, 0)

Original issue reported on code.google.com by MatrixOw...@gmail.com on 31 Jan 2010 at 3:21

GoogleCodeExporter commented 9 years ago
Applied fix for #36 and it worked

Original comment by MatrixOw...@gmail.com on 31 Jan 2010 at 3:31