Issue2200

classification
Title: inspect.getcallargs is not defined
Type: behaviour Severity: urgent
Components: Core Versions: Jython 2.7
Milestone:
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: pitchblack, zyasoft
Priority: Keywords:

Created on 2014-09-07.18:29:47 by pitchblack, last changed 2014-09-07.23:26:50 by zyasoft.

Messages
msg8963 (view) Author: Michael (pitchblack) Date: 2014-09-07.18:29:47
I recently followed the tutorial for installing Django on Jython.  I ran into an error because Django uses getcallargs.  I looked online here and I see that someone documented this issue (Issue2184) as "inspect.getcallargs is not available".  

Jython Error:

Jython 2.7b3+ (default:744d673392b4+, Jul 27 2014, 10:55:20) 
[OpenJDK 64-Bit Server VM (Oracle Corporation)] on java1.7.0_65
Type "help", "copyright", "credits" or "license" for more information.
>>> from inspect import getcallargs
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name getcallargs
>>>



They suggested commenting out the import of getcallargs as a fix.  Then they set the issue as resolved.   

This isn't a good resolution because Django is unable to print out any debugging information. Django uses getcallargs to pass django debugging information back the developer.  If you comment out getcallargs then Django is unable to give you exception details to help you resolve any issues you encounter developing on Django.  The exception that you end up getting provides no details about Django error and only displays that the Jython getcallargs is not defined.  I would like help to get this resolved.




Django Error
[07/Sep/2014 10:47:18] "GET /admin/ HTTP/1.1" 200 3505
Traceback (most recent call last):
  File "C:\jython2.7b2\Lib\wsgiref\handlers.py", line 85, in run
    self.result = application(self.environ, self.start_response)
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\contrib\staticfiles\handlers.py", line 64, in __call__
    return self.application(environ, start_response)
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\core\handlers\wsgi.py", line 187, in __call__
    response = self.get_response(request)
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\core\handlers\base.py", line 199, in get_response
    response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\core\handlers\base.py", line 236, in handle_uncaught_exception
    return debug.technical_500_response(request, *exc_info)
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\views\debug.py", line 91, in technical_500_response
    html = reporter.get_traceback_html()
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\views\debug.py", line 350, in get_traceback_html
    return t.render(c)
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\template\base.py", line 149, in render
    return self._render(context)
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\template\base.py", line 143, in _render
    return self.nodelist.render(context)
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\template\base.py", line 845, in render
    bit = self.render_node(node, context)
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\template\debug.py", line 80, in render_node
    return node.render(context)
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\template\defaulttags.py", line 312, in render
    return nodelist.render(context)
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\template\base.py", line 845, in render
    bit = self.render_node(node, context)
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\template\debug.py", line 80, in render_node
    return node.render(context)
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\template\defaulttags.py", line 201, in render
    nodelist.append(node.render(context))
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\template\debug.py", line 90, in render
    output = self.filter_expression.resolve(context)
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\template\base.py", line 597, in resolve
    obj = self.var.resolve(context)
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\template\base.py", line 597, in resolve
    obj = self.var.resolve(context)
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\template\base.py", line 735, in resolve
    value = self._resolve_lookup(context)
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\template\base.py", line 792, in _resolve_lookup
    getcallargs(current)
  File "C:\jython2.7b2\Lib\site-packages\django-1.7c3-py2.7.egg\django\template\base.py", line 792, in _resolve_lookup
    getcallargs(current)
NameError: global name 'getcallargs' is not defined
msg8967 (view) Author: Jim Baker (zyasoft) Date: 2014-09-07.23:26:39
Duplicate of #2184
History
Date User Action Args
2014-09-07 23:26:50zyasoftsetstatus: open -> closed
2014-09-07 23:26:39zyasoftsetresolution: duplicate
messages: + msg8967
nosy: + zyasoft
2014-09-07 18:29:47pitchblackcreate