Skip to content

ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters #36

Description

@d-nguyen-tmh

Recently I received this error. Do you know how to debug/fix it? I don't see any problems with my data's text.

Traceback (most recent call last):"," File \"\/usr\/local\/bin\/pptx_template\", line 11, in <module>"," load_entry_point('pptx-template==0.2.9', 'console_scripts', 'pptx_template')()"," File \"\/usr\/local\/lib\/python3.6\/site-packages\/pptx_template-0.2.9-py3.6.egg\/pptx_template\/cli.py\", line 75, in main"," File \"\/usr\/local\/lib\/python3.6\/site-packages\/pptx_template-0.2.9-py3.6.egg\/pptx_template\/cli.py\", line 36, in process_all_slides"," File \"\/usr\/local\/lib\/python3.6\/site-packages\/pptx_template-0.2.9-py3.6.egg\/pptx_template\/cli.py\", line 27, in process_one_slide"," File \"\/usr\/local\/lib\/python3.6\/site-packages\/pptx_template-0.2.9-py3.6.egg\/pptx_template\/core.py\", line 45, in edit_slide"," File \"\/usr\/local\/lib\/python3.6\/site-packages\/pptx_template-0.2.9-py3.6.egg\/pptx_template\/styled_text.py\", line 39, in replace_all_els_in_table"," File \"\/usr\/local\/lib\/python3.6\/site-packages\/pptx_template-0.2.9-py3.6.egg\/pptx_template\/styled_text.py\", line 94, in replace_all_els_in_text_frame"," File \"\/usr\/local\/lib\/python3.6\/site-packages\/pptx_template-0.2.9-py3.6.egg\/pptx_template\/styled_text.py\", line 61, in replace_el_in_text_frame_with_list"," File \"\/usr\/local\/lib\/python3.6\/site-packages\/pptx_template-0.2.9-py3.6.egg\/pptx_template\/styled_text.py\", line 136, in _insert_styled_run"," File \"\/usr\/local\/lib\/python3.6\/site-packages\/python_pptx-0.6.17-py3.6.egg\/pptx\/text\/text.py\", line 688, in text"," self._r.t.text = to_unicode(str)"," File \"src\/lxml\/etree.pyx\", line 1024, in lxml.etree._Element.text.__set__"," File \"src\/lxml\/apihelpers.pxi\", line 747, in lxml.etree._setNodeText"," File \"src\/lxml\/apihelpers.pxi\", line 735, in lxml.etree._createTextNode"," File \"src\/lxml\/apihelpers.pxi\", line 1540, in lxml.etree._utf8","ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions