Creating a new Diazo theme, Unicode encode error

Hello !
I'm trying to create a new Diazo theme for plone 4.3.4.1, I get the following error after clicking the création button :
Nous sommes désolés mais il semble qu'il y ait une erreur…
Voici le message d'erreur complet :

Afficher les traces des erreurs sous forme de texte

Traceback (innermost last):

Module ZPublisher.Publish, line 138, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 48, in call_object
Module plone.app.theming.browser.controlpanel, line 50, in call
Module plone.app.theming.browser.controlpanel, line 287, in update
Module plone.app.theming.utils, line 542, in createThemeFromTemplate
Module ConfigParser, line 412, in write
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe8' in position 23: ordinal not in range(128)

Please help me understand and fix this

Hi @PeakyG try creating it without accents, replace your è by just e.

1 Like

@PeakyG May remplace é with é entity HTML

More information HTML Entities

Still have the same error, further more I tried to use the add on plonetheme.responsivetheme 1.1.4 on my production site using the zip file and I m getting a loading error and when I click the aperçu button it displays
NOUS SOMMES DÉSOLÉS MAIS IL SEMBLE QU'IL Y AIT UNE ERREUR…
Voici le message d'erreur complet :

Afficher les traces des erreurs sous forme de texte

Traceback (innermost last):

Module ZPublisher.Publish, line 138, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 48, in call_object
Module plone.app.theming.browser.mapper, line 230, in getFrame
Module plone.app.theming.utils, line 587, in compileThemeTransform
Module diazo.compiler, line 115, in compile_theme
Module diazo.rules, line 230, in process_rules
Module diazo.rules, line 123, in expand_themes
Module lxml.etree, line 2957, in lxml.etree.parse (src/lxml/lxml.etree.c:56299)
Module lxml.etree, line 1526, in lxml.etree._parseDocument (src/lxml/lxml.etree.c:82331)
Module lxml.etree, line 1555, in lxml.etree._parseDocumentFromURL (src/lxml/lxml.etree.c:82624)
Module lxml.etree, line 1455, in lxml.etree._parseDocFromFile (src/lxml/lxml.etree.c:81663)
Module lxml.etree, line 1002, in lxml.etree._BaseParser._parseDocFromFile (src/lxml/lxml.etree.c:78623)
Module lxml.etree, line 569, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:74567)
Module lxml.etree, line 650, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:75458)
Module lxml.etree, line 588, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:74760)
IOError: Error reading file '/++theme++plonetheme.responsivetheme-1.1.4/index.html': failed to load external entity "/++theme++plonetheme.responsivetheme-1.1.4/index.html"
Any suggestions please ?

Hi @PeakyG

No is the same error because the firist error was:

UnicodeEncodeError: ‘ascii’ codec can’t encode character u’\xe8’ in position 23: ordinal not in range(128)

The new error that report here is the following:

IOError: Error reading file ‘/++theme++plonetheme.responsivetheme-1.1.4/index.html’: failed to load external entity "/++theme++plonetheme.responsivetheme-1.1.4/index.html"

Explain IOError message error
The IOError is a Python exception that meaning:

Raised when an I/O operation (such as a print statement, the built-in open() function or a method of a file object) fails for an I/O-related reason, e.g., “file not found” or “disk full”.

Solution
The the problem is because the /++theme++plonetheme.responsivetheme-1.1.4/index.html file can't open or the file not exists.

1 Like

Thank you very much

1 Like

@PeakyG No problem, enjoy hacking Plone!!!