Giter VIP home page Giter VIP logo

ramile's Issues

hello,I've encountered an error shown below,i almost don't understand python at all ,please help

python ramile-cli.py extract ../../AndroidStudioProjects/android-juli
I'm going to extract 3000 lines from ../../AndroidStudioProjects/android-juli.
Traceback (most recent call last):
File "ramile-cli.py", line 30, in
main()
File "ramile-cli.py", line 26, in main
fire.Fire(ramile_cli(), name='ramile')
File "/home/mike/.local/lib/python2.7/site-packages/fire/core.py", line 127, in Fire
component_trace = _Fire(component, args, context, name)
File "/home/mike/.local/lib/python2.7/site-packages/fire/core.py", line 366, in _Fire
component, remaining_args)
File "/home/mike/.local/lib/python2.7/site-packages/fire/core.py", line 542, in _CallCallable
result = fn(*varargs, **kwargs)
File "ramile-cli.py", line 12, in extract
project.run()
File "/mnt/d/www/ramile/ramile/project.py", line 34, in run
for output in file_processor.process(file):
File "/mnt/d/www/ramile/ramile/processors/init.py", line 70, in process
for output in processor.process(file):
File "/mnt/d/www/ramile/ramile/processors/init.py", line 23, in process
with open(file.file_path, 'r', encoding='utf-8') as open_file:
TypeError: 'encoding' is an invalid keyword argument for this function

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

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

怎么去除行后的注释?

例如:alignItems: 'center', //xxxxxxxxxxxxxxxxx

我编写了过滤规则但是没生效,我看到它是直接读取原文件进行保存的,所以我无法实现手动过滤

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.