[wingide-users] Odd behavior under 3.0a3 and TurboGears/SQLAlchemy

Wingware Support support at wingware.com
Tue Jul 31 08:35:12 MDT 2007


Yes, sorry it looks like the problem was fixed in Python in rev. 53954 and
2.5.1 was released earlier, rev. 54863.  Here is the SF bug report with
details:

http://python.org/sf/1569356

- Stephan


Dirk Fromhein wrote:
> 
> It seems not:
> 
> Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit 
> (Intel)]
> Type "help", "copyright", "credits" or "license" for more information.
>  >>> from turbogears.database import metadata, session
> Traceback (most recent call last):
>  File "C:\Program Files (x86)\Wing IDE 3.0\bin\<string>", line 1, in 
> <module>
>  File 
> "c:\Python25\Lib\site-packages\TurboGears-1.0.3.2-py2.5.egg\turbogears\__init__.py", 
> line 6, in <module>
>    from turbogears.controllers import expose, flash, validate, redirect, \
>  File 
> "c:\Python25\Lib\site-packages\TurboGears-1.0.3.2-py2.5.egg\turbogears\controllers.py", 
> line 8, in <module>
>    from dispatch import generic, strategy, functions
>  File 
> "C:\Python25\lib\site-packages\ruledispatch-0.5a0.dev_r2306-py2.5-win32.egg\dispatch\functions.py", 
> line 126, in <module>
>  File 
> "C:\Python25\lib\site-packages\ruledispatch-0.5a0.dev_r2306-py2.5-win32.egg\dispatch\functions.py", 
> line 433, in Dispatcher
> AttributeError: 'function' object has no attribute 'when'
>  >>> *
> This is with Wing 3.0 b1
> 
> Thanks,
> Dirk
> 
> *
> Wingware Support wrote:
>> Dirk Fromhein wrote:
>>> I'm a bit confused by an error we are seeing under Wing 3.0a3 (and 
>>> 2.1 actually also) and TurboGears/SQLAlchemy 1.02 in the PythonShell 
>>> tab panel when I execute:
>>>  >>> from turbogears.database import metadata, session
>>> Traceback (most recent call last):
>>>  File "C:\src\SiteManager\sitemanager\<string>", line 1, in ?
>>>  File 
>>> "c:\Python24\Lib\site-packages\TurboGears-1.0.2.2-py2.4.egg\turbogears\__init__.py", 
>>> line 6, in ?
>>>    from turbogears.controllers import expose, flash, validate, 
>>> redirect, \
>>>  File 
>>> "c:\Python24\Lib\site-packages\TurboGears-1.0.2.2-py2.4.egg\turbogears\controllers.py", 
>>> line 8, in ?
>>>    from dispatch import generic, strategy, functions
>>>  File 
>>> "C:\Python24\lib\site-packages\ruledispatch-0.5a0.dev_r2306-py2.4-win32.egg\dispatch\functions.py", 
>>> line 126, in ?
>>>  File 
>>> "C:\Python24\lib\site-packages\ruledispatch-0.5a0.dev_r2306-py2.4-win32.egg\dispatch\functions.py", 
>>> line 433, in Dispatcher
>>> AttributeError: 'function' object has no attribute 'when'
>>>
>>> However, if I execute "from turbogears.database import metadata, 
>>> session" in IDLE or the python shell in a terminal window I get no 
>>> errors and everything seems to work just fine.
>>
>> Turns out this is an obscure bug in Python's debug tracer code.  Wing's
>> shell runs with the debug tracer installed and brings out the bug.  I
>> was able to run the same code in Wing's debugger without problems, but
>> that's a detail of how the invocation happens in each case.  We've
>> seen the same bug in other parts of Turbogears under the debugger
>> as well.
>>
>> I believe the bug has been fixed in Python sources but I don't know
>> if it's been fixed in a release (would be in 2.5.1 if anything).
>>


More information about the wingide-users mailing list