I can't understand what the following error means and how to avoid it:
File
"/usr/lib/python2.4/site-packages/TurboGears-1.0b2-py2.4.egg/turbogears/controllers.py",
line 53, in _process_output
js[script.location].add(script)
KeyError: 'bodybottom'
jo
Alberto Valverde ha scritto:
> On Dec 2, 2006, at 9:53 AM, jose wrote:
>
>
>> jose wrote:
>>
>>
>>> Hi Alberto,
>>> I have this error using tgsample...
>>>
>>> $ python start-tgsample.py
>>> Traceback (most recent call last):
>>> File "start-tgsample.py", line 33, in ?
>>> from tgsample.controllers import Root
>>> File "/home/jose/tosca/tgsample/controllers.py", line 9, in ?
>>> from toscawidgets.forms import DataGrid
>>> File
>>> "/usr/lib/python2.4/site-packages/toscawidgets/forms/__init__.py",
>>> line
>>> 3, in ?
>>> from toscawidgets.forms.datagrid import *
>>> File
>>> "/usr/lib/python2.4/site-packages/toscawidgets/forms/datagrid.py",
>>> line
>>> 59, in ?
>>> class DataGrid(Widget):
>>> File
>>> "/usr/lib/python2.4/site-packages/toscawidgets/forms/datagrid.py",
>>> line
>>> 73, in DataGrid
>>> css=[CSSLink(__name__, 'static/grid.css')]
>>> File "build/bdist.macosx-10.4-fat/egg/toscawidgets/util.py", line
>>> 81,
>>> in wrapped
>>> File "<string>", line 5, in pre_init
>>> File "build/bdist.macosx-10.4-fat/egg/toscawidgets/core.py", line
>>> 230,
>>> in __pre_init
>>> ValueError: 'toscawidgets.forms.datagrid' is not a valid id for a
>>> Widget
>>>
>>> jo
>>>
>>>
>>>
>> I installed forms using svn co
>> http://www.turbogears.org/svn/turbogears/projects/ToscaWidgetsForms/
>> trunk
>> toscawidgetsforms
>> because easy_install ToscaWidgetsJS gives me an error:
>>
>>
>> # easy_install ToscaWidgetsJS
>>
>> Searching for ToscaWidgetsJS
>> Reading http://www.python.org/pypi/ToscaWidgetsJS/
>> Reading http://www.python.org/pypi/ToscaWidgetsJS/0.1a0dev-r2136
>> No local packages or download links found for ToscaWidgetsJS
>> error: Could not find suitable distribution for
>> Requirement.parse('ToscaWidgetsJS')
>>
>
> I think you're probably using python2.3. Currently ToscaWidgets needs
> python2.4 to work so there's no egg at the cheesehop for 2.3.
>
>
>> after svn co
>> http://www.turbogears.org/svn/turbogears/projects/ToscaWidgetsForms/
>> trunk
>> toscawidgetsforms
>>
>> I create a package in site-packages named toscawidgets and I put
>> inside
>> the toscawidgetsforms/forms
>> and now it looks like this:
>>
>> toscawidgets/
>> __init__.py
>> forms/
>> calendars.py
>> core.py
>> datagrid.py
>> fields.py
>> __init__.py
>> static/
>> templates/
>> validators.py
>> js_interface/
>> core.py
>> functions.py
>> __init__.py
>> static/
>> widgets.py
>> release.py
>>
>>
>> Is it correct?
>>
>
> Yes and no :) That's the correct "virtual" structure but
> "toscawidgets" is a setuptools namespace package (http://tinyurl.com/
> yauj5n) which means that the "forms" and "js_interface" packages,
> although distributed in different eggs, can be imported form the
> "toscawidgets" namespace. If setuptools correctly installs them you
> should not worry about their real filesystem structure (and certainly
> not manually tweak it ;) )
>
> Regarding the traceback you mentioned in your previous email, it
> should go away if you update to the latest ToscaWidgets in svn. It's
> related to http://tinyurl.com/ygrne7
>
> I'm going to merge ToscaWidgetsJS into ToscaWidgets later today as I
> now see no reason to distribute them separately and update the
> "install_requires" in setup.py to require the correct versions so
> these problems you're having wont pop up again... keep an eye on the
> trac timeline and try installing when I'm done.
>
> Sorry for the inconvenience, my fault.
>
> Alberto
>
> P.S. We should better move this discussion to the trunk ML...
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---