使用ubuntu 18.04:当我想替换文件中的文本并且不知道如何解决该问题时,我从'rpl'中收到一条错误消息:
Traceback (most recent call last):
File "/usr/bin/rpl", line 314, in <module> main()
File "/usr/bin/rpl", line 246, in main matches = blockrepl(f, o, regex, old_str, new_str, 1024)
File "/usr/bin/rpl", line 92, in blockrepl parts = (after.join(parts)).encode(encoding=encoding, errors='ignore')
TypeError: encode() argument 1 must be str, not None
我使用的命令是:
rpl -q '##HEADER##' ' ' main.html