Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
fly7632785 opened this issue Nov 17, 2022 · 2 comments

Comments

@fly7632785
Copy link

All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters
请问这个报错怎么处理呢?

I'm going to extract 300000000.0 lines from E:\workspace\xiaoxi\moye\XDataCenter_Server\AdIncome\client. 
Traceback (most recent call last): 
  File "C:\Users\Administrator\Desktop\ramile-master\ramile-cli.py", line 30, in <module> 
    main()
  File "C:\Users\Administrator\Desktop\ramile-master\ramile-cli.py", line 26, in main
  File "C:\Python39\lib\site-packages\fire\core.py", line 141, in Fire
    component_trace = _Fire(component, args, parsed_flag_args, context, name)
  File "C:\Python39\lib\site-packages\fire\core.py", line 466, in _Fire
    component, remaining_args = _CallAndUpdateTrace(
  File "C:\Python39\lib\site-packages\fire\core.py", line 681, in _CallAndUpdateTrace
    component = fn(*varargs, **kwargs)
  File "C:\Users\Administrator\Desktop\ramile-master\ramile-cli.py", line 12, in extract
    project.run()
  File "C:\Users\Administrator\Desktop\ramile-master\ramile\project.py", line 37, in run
    self.export(output)
  File "C:\Users\Administrator\Desktop\ramile-master\ramile\project.py", line 77, in export
    self.paragraph.add_run(line)
  File "C:\Python39\lib\site-packages\docx\text\paragraph.py", line 37, in add_run
    run.text = text
  File "C:\Python39\lib\site-packages\docx\text\run.py", line 163, in text
    self._r.text = text
  File "C:\Python39\lib\site-packages\docx\oxml\text\run.py", line 104, in text
    _RunContentAppender.append_to_run_from_text(self, text)
  File "C:\Python39\lib\site-packages\docx\oxml\text\run.py", line 134, in append_to_run_from_text
    appender.add_text(text)
  File "C:\Python39\lib\site-packages\docx\oxml\text\run.py", line 142, in add_text
    self.add_char(char)
  File "C:\Python39\lib\site-packages\docx\oxml\text\run.py", line 157, in add_char
    self.flush()
  File "C:\Python39\lib\site-packages\docx\oxml\text\run.py", line 165, in flush
    self._r.add_t(text)
  File "C:\Python39\lib\site-packages\docx\oxml\text\run.py", line 41, in add_t
    t = self._add_t(text=text)
  File "C:\Python39\lib\site-packages\docx\oxml\xmlchemy.py", line 273, in _add_child
    setattr(child, key, value)
  File "src\lxml\etree.pyx", line 1041, in lxml.etree._Element.text.__set__
  File "src\lxml\apihelpers.pxi", line 748, in lxml.etree._setNodeText
  File "src\lxml\apihelpers.pxi", line 736, in lxml.etree._createTextNode
  File "src\lxml\apihelpers.pxi", line 1541, in lxml.etree._utf8
ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters
@sunny-zhang-98
Copy link

@fly7632785 你是不是前端项目

@sunny-zhang-98
Copy link

感觉有可能是JS 类似的文件被压缩一行的情况

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants