[Usuarios Plone] UnicodeDecodeErroR

Luis Feijoo luisfe101 at gmail.com
Wed Nov 13 21:51:16 UTC 2013


Es un Page Template.
Abajo pongo el Traceback.
Tipo de ExcepciónUnicodeDecodeErrorValor de la Excepción'ascii' codec can't
decode byte 0xc3 in position 2: ordinal not in range(128)

Traceback (innermost last):

   - Module ZPublisher.Publish, line 127, in publish
   - Module ZPublisher.mapply, line 77, in mapply
   - Module ZPublisher.Publish, line 47, in call_object
   - Module Shared.DC.Scripts.Bindings, line 324, in __call__
   - Module Products.PloneHotfix20121106.python_scripts, line 63, in
   _patched_bindAndExec
   - Module Shared.DC.Scripts.Bindings, line 361, in _bindAndExec
   - Module Products.CMFCore.FSPageTemplate, line 240, in _exec
   - Module Products.CMFCore.FSPageTemplate, line 180, in pt_render
   - Module Products.PageTemplates.PageTemplate, line 80, in pt_render
   - Module zope.pagetemplate.pagetemplate, line 113, in pt_render
   - Module zope.tal.talinterpreter, line 271, in __call__
   - Module zope.tal.talinterpreter, line 343, in interpret
   - Module zope.tal.talinterpreter, line 888, in do_useMacro
   - Module zope.tal.talinterpreter, line 343, in interpret
   - Module zope.tal.talinterpreter, line 533, in do_optTag_tal
   - Module zope.tal.talinterpreter, line 518, in do_optTag
   - Module zope.tal.talinterpreter, line 513, in no_tag
   - Module zope.tal.talinterpreter, line 343, in interpret
   - Module zope.tal.talinterpreter, line 852, in do_condition
   - Module zope.tal.talinterpreter, line 343, in interpret
   - Module zope.tal.talinterpreter, line 533, in do_optTag_tal
   - Module zope.tal.talinterpreter, line 518, in do_optTag
   - Module zope.tal.talinterpreter, line 513, in no_tag
   - Module zope.tal.talinterpreter, line 343, in interpret
   - Module zope.tal.talinterpreter, line 531, in do_optTag_tal
   - Module zope.tal.talinterpreter, line 513, in no_tag
   - Module zope.tal.talinterpreter, line 343, in interpret
   - Module zope.tal.talinterpreter, line 742, in do_insertStructure_tal
   - Module Products.PageTemplates.Expressions, line 220, in
   evaluateStructure
   - Module zope.tales.tales, line 696, in evaluate
   *URL:
   file:/opt/eduCommons-4.1.1/eggs/enpraxis.leftskin-2.3-py2.6.egg/enpraxis/leftskin/skins/leftskin/main_template.pt
   <http://main_template.pt>*
   *Line 49, Column 8*
   *Expression: <StringExpr u'plone.htmlhead'>*
   *Names:*

   {'container': <PloneSite at /OCW>,
    'context': <ATDocument at
/OCW/educacion-continua/computacion-basica/guia-de-aprendizaje>,
    'default': <object object at 0xb76d95d8>,
    'here': <ATDocument at
/OCW/educacion-continua/computacion-basica/guia-de-aprendizaje>,
    'loop': {},
    'nothing': None,
    'options': {'args': ()},
    'repeat': <Products.PageTemplates.Expressions.SafeMapping object
at 0xb387370c>,
    'request': <HTTPRequest,
URL=http://se.utpl.edu.ec:8080/OCW/educacion-continua/computacion-basica/guia-de-aprendizaje/document_view>,
    'root': <Application at >,
    'template': <FSPageTemplate at /OCW/document_view used for
/OCW/educacion-continua/computacion-basica/guia-de-aprendizaje>,
    'traverse_subpath': [],
    'user': <PropertiedUser 'admin'>}

   - Module zope.contentprovider.tales, line 80, in __call__
   - Module plone.app.viewletmanager.manager, line 85, in render
   - Module Products.Five.browser.pagetemplatefile, line 126, in __call__
   - Module Products.Five.browser.pagetemplatefile, line 60, in __call__
   - Module zope.pagetemplate.pagetemplate, line 113, in pt_render
   - Module zope.tal.talinterpreter, line 271, in __call__
   - Module zope.tal.talinterpreter, line 343, in interpret
   - Module zope.tal.talinterpreter, line 852, in do_condition
   - Module zope.tal.talinterpreter, line 343, in interpret
   - Module zope.tal.talinterpreter, line 533, in do_optTag_tal
   - Module zope.tal.talinterpreter, line 518, in do_optTag
   - Module zope.tal.talinterpreter, line 513, in no_tag
   - Module zope.tal.talinterpreter, line 343, in interpret
   - Module zope.tal.talinterpreter, line 819, in do_loop_tal
   - Module zope.tales.tales, line 682, in setRepeat
   - Module zope.tales.tales, line 696, in evaluate
   *URL:
   /opt/eduCommons-4.1.1/eggs/sc.social.like-2.0a2-py2.6.egg/sc/social/like/browser/templates/metadata.pt
   <http://metadata.pt>*
   *Line 2, Column 2*
   *Expression: <PathExpr standard:u'view/plugins'>*
   *Names:*

   {'args': (),
    'container': <ATDocument at
/OCW/educacion-continua/computacion-basica/guia-de-aprendizaje>,
    'context': <ATDocument at
/OCW/educacion-continua/computacion-basica/guia-de-aprendizaje>,
    'default': <object object at 0xb76d95d8>,
    'here': <ATDocument at
/OCW/educacion-continua/computacion-basica/guia-de-aprendizaje>,
    'loop': {},
    'nothing': None,
    'options': {},
    'repeat': <Products.PageTemplates.Expressions.SafeMapping object
at 0xb383302c>,
    'request': <HTTPRequest,
URL=http://se.utpl.edu.ec:8080/OCW/educacion-continua/computacion-basica/guia-de-aprendizaje/document_view>,
    'root': <Application at >,
    'template':
<Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at
0xc46b84c>,
    'traverse_subpath': [],
    'user': <PropertiedUser 'admin'>,
    'view': <Products.Five.viewlet.metaconfigure.SocialMetadataViewlet
object at 0xb3a0460c>,
    'views': <Products.Five.browser.pagetemplatefile.ViewMapper object
at 0xb394d7cc>}

   - Module zope.tales.expressions, line 217, in __call__
   - Module Products.PageTemplates.Expressions, line 157, in _eval
   - Module Products.PageTemplates.Expressions, line 119, in render
   - Module sc.social.like.browser.viewlets, line 28, in plugins
   - Module OFS.Traversable, line 310, in restrictedTraverse
   - Module OFS.Traversable, line 201, in unrestrictedTraverse
   __traceback_info__: ([], '@@twitter-plugin')
   - Module zope.traversing.namespace, line 114, in namespaceLookup
   - Module Products.PloneHotfix20121106.atat, line 14, in traverse
   - Module zope.traversing.namespace, line 329, in traverse
   - Module zope.component._api, line 122, in queryMultiAdapter
   - Module zope.component.registry, line 240, in queryMultiAdapter
   - Module zope.interface.adapter, line 522, in queryMultiAdapter
   - Module sc.social.like.plugins.twitter.browser, line 41, in __init__

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 2:
ordinal not in range(128)


El 13 de noviembre de 2013 16:39, Mikel Larreategi <
mlarreategi en codesyntax.com> escribió:

> Yo no tocaría el sys.defaultencoding bajo ningún concepto:
>
>
> http://blog.startifact.com/posts/older/changing-the-python-default-encoding-considered-harmful.html
>
> Pregunta para Luis:
>
> Péganos por favor el traceback completo. ¿dónde está ese texto? Tienes un
> un Page Template o Python script el texto con las tildes?
>
>
> Mikel
>
>
> 2013/11/13 Leonardo Caballero <leonardocaballero en gmail.com>
>
>> Luis
>>
>> Si accedes al "Configuración del sitio  > Errores" acá
>> http://localhost:8080/Plone/prefs_error_log_form allí debería parecer el
>> error completo que estas reportando, es necesario analizar para saber que
>> error específicamente tienes.
>>
>> Mas una posible opción es que habilites soporte a UTF-8 en la instancia
>> Zope en tu configuracion buildout
>>
>> parts =
>>     ...
>>     instance-sitecustomize
>>
>> # This recipe help to enabled encoding to utf-8.
>> # For options see http://pypi.python.org/pypi/collective.recipe.template
>> [instance-sitecustomize]
>> recipe = collective.recipe.template
>> inline =
>>     import sys
>>     sys.setdefaultencoding('utf-8')
>> output = ${instance:location}/sitecustomize.py
>> mode = 644
>>
>> Reconstruyes el buildout y luego inicias tu instancia Zope ya deberías
>> tener solventando este problema!
>>
>>
>> 2013/11/13 Luis Feijoo <luisfe101 en gmail.com>
>>
>>> si efectivamente ahí esta el error, y si estoy llamando a una función
>>> decode...
>>>
>>>
>>> El 13 de noviembre de 2013 13:05, Julio Jesús León Pérez <
>>> xulioxesus en gmail.com> escribió:
>>>
>>>> Tiene que ver con la tilde en "Educación". Ese string es unicode y al
>>>> intentar pasarlo a una cadena normal, falla. Estás llamando a la función
>>>> decode?
>>>> El 13/11/2013 18:58, "Luis Feijoo" <luisfe101 en gmail.com> escribió:
>>>>
>>>>>  buenos días ploneros al abrir una sección de Plone me aparece este
>>>>> error:
>>>>>
>>>>> UnicodeDecodeError('ascii', 'Educaci\xc3\xb3n Continua - xxx ', 7, 8,
>>>>> 'ordinal not in range(128)') (Also, the following error occurred while
>>>>> attempting to render the standard error message, please see the event log
>>>>> for full details: ('ascii', 'Educaci\xc3\xb3n Continua - xxxx', 7, 8,
>>>>> 'ordinal not in range(128)'))
>>>>>
>>>>> Algun comentario de porquese produce y como puedo arreglarlo?
>>>>>
>>>>> --
>>>>> Luis
>>>>>
>>>>> _______________________________________________
>>>>> Usuarios-Plone mailing list
>>>>> Usuarios-Plone en lists.plone.org
>>>>> https://lists.plone.org/mailman/listinfo/plone-usuarios-plone
>>>>>
>>>>>
>>>
>>>
>>> --
>>> Luis
>>>
>>> _______________________________________________
>>> Usuarios-Plone mailing list
>>> Usuarios-Plone en lists.plone.org
>>> https://lists.plone.org/mailman/listinfo/plone-usuarios-plone
>>>
>>>
>>
>>
>> --
>> Atentamente
>>
>> T.S.U. Leonardo Caballero
>> Linux Counter ID = https://linuxcounter.net/user/369081.html
>> Key fingerprint = 9FD2 DC71 38E7 A1D1 57F5  1D29 04DE 43BC 8A27 424A
>>
>> /me Corriendo Debian Wheezy y Canaina GNU/Linux 3
>> /me Cree "El Conocimiento Humano le Pertenece al Mundo"
>>
>> _______________________________________________
>> Usuarios-Plone mailing list
>> Usuarios-Plone en lists.plone.org
>> https://lists.plone.org/mailman/listinfo/plone-usuarios-plone
>>
>>
>
>
> --
> Mikel Larreategi
> mlarreategi en codesyntax.com
>
> CodeSyntax
> Azitaingo Industrialdea 3 K
> E-20600 Eibar
> Tel: (+34) 943 82 17 80
>
> _______________________________________________
> Usuarios-Plone mailing list
> Usuarios-Plone en lists.plone.org
> https://lists.plone.org/mailman/listinfo/plone-usuarios-plone
>
>


-- 
Luis
------------ pr?xima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://lists.plone.org/pipermail/plone-usuarios-plone/attachments/20131113/8d9143ff/attachment-0001.html>


More information about the Usuarios-Plone mailing list