A problem with AutocompleteWidget

2 messages Options
Embed this post
Permalink
macagua () A problem with AutocompleteWidget
Reply Threaded More More options
Print post
Permalink
Hi guys

I developing a new content type called GestionComunal and defined some
attributes for these class are "StringField" and with
widget:type="AutocompleteWidget" [0].

The example for my class

from Products.AutocompleteWidget import AutocompleteWidget

.
.
.

    StringField(
        name='state',
        widget=AutocompleteWidget(
            label="State of Country",
            label_msgid="label_organization_state",
            description="Enter the state where the organization is located",
            description_msgid="help_organization_state",
            i18n_domain='GestionComunal',
        ),
        enforceVocabulary=False,
        searchable=True,
        vocabulary=VOCAB_STATES_VE,
        required=True,
    ),


    StringField(
        name='parish',
        widget=AutocompleteWidget(
            label="Parish name",
            label_msgid="label_organization_parish",
            description="Enter the parish where the organization is located",
            description_msgid="help_organization_parish",
            i18n_domain='GestionComunal',
        ),
        enforceVocabulary=False,
        vocabulary=VOCAB_PARISH_MRDA_VE,
        searchable=True,
        actb_timeout=2250,
        required=False,
        actb_expand_onfocus="True",
        actb_filter_bogus="False",
        actb_firsttext="True",
        actb_complete_on_tab="True",
        actb_lim=5,
    ),

Then when I am deploying my product on my buildout installation en
debug mode (bin/instance fg) show the bellow message [1]

2009-07-15 13:30:18 ERROR Application Couldn't install GestionComunal
Traceback (most recent call last):
  File "/home/macagua/proyectos/plone/apps/plone3.buildout/parts/zope2/lib/python/OFS/Application.py",
line 786, in install_product
    initmethod(context)
  File "/home/macagua/proyectos/plone/apps/plone3.buildout/products/GestionComunal/__init__.py",
line 76, in initialize
    import content
  File "/home/macagua/proyectos/plone/apps/plone3.buildout/products/GestionComunal/content/__init__.py",
line 43, in ?
    import Organization
  File "/home/macagua/proyectos/plone/apps/plone3.buildout/products/GestionComunal/content/Organization.py",
line 126, in ?
    i18n_domain='GestionComunal',
TypeError: 'module' object is not callable
Traceback (most recent call last):
  File "/home/macagua/proyectos/plone/apps/plone3.buildout/parts/zope2/lib/python/Zope2/Startup/run.py",
line 56, in ?
    run()
  File "/home/macagua/proyectos/plone/apps/plone3.buildout/parts/zope2/lib/python/Zope2/Startup/run.py",
line 21, in run
    starter.prepare()
  File "/home/macagua/proyectos/plone/apps/plone3.buildout/parts/zope2/lib/python/Zope2/Startup/__init__.py",
line 102, in prepare
    self.startZope()
  File "/home/macagua/proyectos/plone/apps/plone3.buildout/parts/zope2/lib/python/Zope2/Startup/__init__.py",
line 278, in startZope
    Zope2.startup()
  File "/home/macagua/proyectos/plone/apps/plone3.buildout/parts/zope2/lib/python/Zope2/__init__.py",
line 47, in startup
    _startup()
  File "/home/macagua/proyectos/plone/apps/plone3.buildout/parts/zope2/lib/python/Zope2/App/startup.py",
line 102, in startup
    OFS.Application.initialize(application)
  File "/home/macagua/proyectos/plone/apps/plone3.buildout/parts/zope2/lib/python/OFS/Application.py",
line 309, in initialize
    initializer.initialize()
  File "/home/macagua/proyectos/plone/apps/plone3.buildout/parts/zope2/lib/python/OFS/Application.py",
line 338, in initialize
    self.install_products()
  File "/home/macagua/proyectos/plone/apps/plone3.buildout/parts/zope2/lib/python/OFS/Application.py",
line 603, in install_products
    return install_products(app)
  File "/home/macagua/proyectos/plone/apps/plone3.buildout/parts/zope2/lib/python/OFS/Application.py",
line 634, in install_products
    folder_permissions, raise_exc=debug_mode)
  File "/home/macagua/proyectos/plone/apps/plone3.buildout/parts/zope2/lib/python/OFS/Application.py",
line 786, in install_product
    initmethod(context)
  File "/home/macagua/proyectos/plone/apps/plone3.buildout/products/GestionComunal/__init__.py",
line 76, in initialize
    import content
  File "/home/macagua/proyectos/plone/apps/plone3.buildout/products/GestionComunal/content/__init__.py",
line 43, in ?
    import Organization
  File "/home/macagua/proyectos/plone/apps/plone3.buildout/products/GestionComunal/content/Organization.py",
line 126, in ?
    i18n_domain='GestionComunal',
TypeError: 'module' object is not callable

If i understand what meaning this error, it is because i try to call
at a attribute like a method, i don't now what happened, because i
following the instructions based on README.txt of AutocompleteWidget
[2]

I hope hear you coming soon your comments

[0] http://plone.org/products/autocompletewidget/
[1] http://pastebin.com/f6f226beb
[2] https://svn.plone.org/svn/archetypes/MoreFieldsAndWidgets/AutocompleteWidget/branches/improved_multivalued_fields_management/README.txt

--
Atentamente

T.S.U. Leonardo Caballero
Linux Counter ID =
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=369081
Key fingerprint = 9FD2 DC71 38E7 A1D1 57F5  1D29 04DE 43BC 8A27 424A

/me Corriendo Debian Lenny 5.0 y Canaina GNU/Linux 2.0
/me Cree "El Conocimiento Humano le Pertenece al Mundo"

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Archetypes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/archetypes-users
macagua () Re: A problem with AutocompleteWidget
Reply Threaded More More options
Print post
Permalink
Thanks David ;)

Oh God, This product was tested with Plone 2.5, someone been tested
AutocompleteWidget on Plone 3

2009/7/17 david bain <[hidden email]>:

> Just wondering this is on Plone 3? I didn't realize that there was a Plone 3
> version.
>
> On Thu, Jul 16, 2009 at 3:48 PM, Leonardo Caballero
> <[hidden email]> wrote:
>>
>> Hi guys
>>
>> I developing a new content type called GestionComunal and defined some
>> attributes for these class are "StringField" and with
>> widget:type="AutocompleteWidget" [0].
>>
>> The example for my class
>>
>> from Products.AutocompleteWidget import AutocompleteWidget
>>
>> .
>> .
>> .
>>
>>    StringField(
>>        name='state',
>>        widget=AutocompleteWidget(
>>            label="State of Country",
>>            label_msgid="label_organization_state",
>>            description="Enter the state where the organization is
>> located",
>>            description_msgid="help_organization_state",
>>            i18n_domain='GestionComunal',
>>        ),
>>        enforceVocabulary=False,
>>        searchable=True,
>>        vocabulary=VOCAB_STATES_VE,
>>        required=True,
>>    ),
>>
>>
>>    StringField(
>>        name='parish',
>>        widget=AutocompleteWidget(
>>            label="Parish name",
>>            label_msgid="label_organization_parish",
>>            description="Enter the parish where the organization is
>> located",
>>            description_msgid="help_organization_parish",
>>            i18n_domain='GestionComunal',
>>        ),
>>        enforceVocabulary=False,
>>        vocabulary=VOCAB_PARISH_MRDA_VE,
>>        searchable=True,
>>        actb_timeout=2250,
>>        required=False,
>>        actb_expand_onfocus="True",
>>        actb_filter_bogus="False",
>>        actb_firsttext="True",
>>        actb_complete_on_tab="True",
>>        actb_lim=5,
>>    ),
>>
>> Then when I am deploying my product on my buildout installation en
>> debug mode (bin/instance fg) show the bellow message [1]
>>
>> 2009-07-15 13:30:18 ERROR Application Couldn't install GestionComunal
>> Traceback (most recent call last):
>>  File
>> "/home/macagua/proyectos/plone/apps/plone3.buildout/parts/zope2/lib/python/OFS/Application.py",
>> line 786, in install_product
>>    initmethod(context)
>>  File
>> "/home/macagua/proyectos/plone/apps/plone3.buildout/products/GestionComunal/__init__.py",
>> line 76, in initialize
>>    import content
>>  File
>> "/home/macagua/proyectos/plone/apps/plone3.buildout/products/GestionComunal/content/__init__.py",
>> line 43, in ?
>>    import Organization
>>  File
>> "/home/macagua/proyectos/plone/apps/plone3.buildout/products/GestionComunal/content/Organization.py",
>> line 126, in ?
>>    i18n_domain='GestionComunal',
>> TypeError: 'module' object is not callable
>> Traceback (most recent call last):
>>  File
>> "/home/macagua/proyectos/plone/apps/plone3.buildout/parts/zope2/lib/python/Zope2/Startup/run.py",
>> line 56, in ?
>>    run()
>>  File
>> "/home/macagua/proyectos/plone/apps/plone3.buildout/parts/zope2/lib/python/Zope2/Startup/run.py",
>> line 21, in run
>>    starter.prepare()
>>  File
>> "/home/macagua/proyectos/plone/apps/plone3.buildout/parts/zope2/lib/python/Zope2/Startup/__init__.py",
>> line 102, in prepare
>>    self.startZope()
>>  File
>> "/home/macagua/proyectos/plone/apps/plone3.buildout/parts/zope2/lib/python/Zope2/Startup/__init__.py",
>> line 278, in startZope
>>    Zope2.startup()
>>  File
>> "/home/macagua/proyectos/plone/apps/plone3.buildout/parts/zope2/lib/python/Zope2/__init__.py",
>> line 47, in startup
>>    _startup()
>>  File
>> "/home/macagua/proyectos/plone/apps/plone3.buildout/parts/zope2/lib/python/Zope2/App/startup.py",
>> line 102, in startup
>>    OFS.Application.initialize(application)
>>  File
>> "/home/macagua/proyectos/plone/apps/plone3.buildout/parts/zope2/lib/python/OFS/Application.py",
>> line 309, in initialize
>>    initializer.initialize()
>>  File
>> "/home/macagua/proyectos/plone/apps/plone3.buildout/parts/zope2/lib/python/OFS/Application.py",
>> line 338, in initialize
>>    self.install_products()
>>  File
>> "/home/macagua/proyectos/plone/apps/plone3.buildout/parts/zope2/lib/python/OFS/Application.py",
>> line 603, in install_products
>>    return install_products(app)
>>  File
>> "/home/macagua/proyectos/plone/apps/plone3.buildout/parts/zope2/lib/python/OFS/Application.py",
>> line 634, in install_products
>>    folder_permissions, raise_exc=debug_mode)
>>  File
>> "/home/macagua/proyectos/plone/apps/plone3.buildout/parts/zope2/lib/python/OFS/Application.py",
>> line 786, in install_product
>>    initmethod(context)
>>  File
>> "/home/macagua/proyectos/plone/apps/plone3.buildout/products/GestionComunal/__init__.py",
>> line 76, in initialize
>>    import content
>>  File
>> "/home/macagua/proyectos/plone/apps/plone3.buildout/products/GestionComunal/content/__init__.py",
>> line 43, in ?
>>    import Organization
>>  File
>> "/home/macagua/proyectos/plone/apps/plone3.buildout/products/GestionComunal/content/Organization.py",
>> line 126, in ?
>>    i18n_domain='GestionComunal',
>> TypeError: 'module' object is not callable
>>
>> If i understand what meaning this error, it is because i try to call
>> at a attribute like a method, i don't now what happened, because i
>> following the instructions based on README.txt of AutocompleteWidget
>> [2]
>>
>> I hope hear you coming soon your comments
>>
>> [0] http://plone.org/products/autocompletewidget/
>> [1] http://pastebin.com/f6f226beb
>> [2]
>> https://svn.plone.org/svn/archetypes/MoreFieldsAndWidgets/AutocompleteWidget/branches/improved_multivalued_fields_management/README.txt
>>
>> --
>> Atentamente
>>
>> T.S.U. Leonardo Caballero
>> Linux Counter ID =
>> http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=369081
>> Key fingerprint = 9FD2 DC71 38E7 A1D1 57F5  1D29 04DE 43BC 8A27 424A
>>
>> /me Corriendo Debian Lenny 5.0 y Canaina GNU/Linux 2.0
>> /me Cree "El Conocimiento Humano le Pertenece al Mundo"
>>
>>
>> ------------------------------------------------------------------------------
>> Enter the BlackBerry Developer Challenge
>> This is your chance to win up to $100,000 in prizes! For a limited time,
>> vendors submitting new applications to BlackBerry App World(TM) will have
>> the opportunity to enter the BlackBerry Developer Challenge. See full
>> prize
>> details at: http://p.sf.net/sfu/Challenge
>> _______________________________________________
>> Archetypes-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/archetypes-users
>
>
>
> --
> SplashStart - Professional Websites. Starting Now.
> http://www.splashstart.com
>
>



--
Atentamente

T.S.U. Leonardo Caballero
Linux Counter ID =
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=369081
Key fingerprint = 9FD2 DC71 38E7 A1D1 57F5  1D29 04DE 43BC 8A27 424A

/me Corriendo Debian Lenny 5.0 y Canaina GNU/Linux 2.0
/me Cree "El Conocimiento Humano le Pertenece al Mundo"

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Archetypes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/archetypes-users