Closed jiang849725768 closed 3 years ago
Hi,应该解决了,git pull
后重新运行试试 ;-)
抱歉,出现了新的问题,我的系统是win10,请问是否是问题的原因?
Traceback (most recent call last):
File "hugo-encryptor.py", line 56, in <module>
soup = BeautifulSoup(open(xmlpath),'xml')
FileNotFoundError: [Errno 2] No such file or directory: './public/index.xml'
以下是public文件夹的文件截图
我们有个小功能忘记考虑这个边缘情况了,git pull
后应该就没问题了~十分抱歉~
Traceback (most recent call last):
File "hugo-encryptor.py", line 86, in <module>
f.write(str(soup))
UnicodeEncodeError: 'gbk' codec can't encode character '\u200b' in position 3181: illegal multibyte sequence
十分感谢你们的帮助,屡次麻烦实在是不好意思
呃,还是编码问题,稍等哈…我这边是 mac,一直能跑通就没大注意=。=
Edited: 手头没有 win,等我找台机器测通了再上(
Hi,手头没有 windows 机器,我怕改完你那边发现又有问题,等我找到机器自己试一下先。
这个报错出现在对 feed 的处理上,你现在可以直接忽略这个报错。因为,如果你在需要加密的文本前有加上一行 <!--more-->
的话,Hugo 就不会将你的加密部分内容放入 feed 中,feed 不经过 hugo-encryptor 的处理也不会泄露信息。
Traceback (most recent call last): File "hugo-encryptor.py", line 86, in <module> f.write(str(soup)) UnicodeEncodeError: 'gbk' codec can't encode character '\u200b' in position 3181: illegal multibyte sequence
十分感谢你们的帮助,屡次麻烦实在是不好意思
请问你现在解决了吗
Traceback (most recent call last): File "hugo-encryptor.py", line 86, in <module> f.write(str(soup)) UnicodeEncodeError: 'gbk' codec can't encode character '\u200b' in position 3181: illegal multibyte sequence
十分感谢你们的帮助,屡次麻烦实在是不好意思
请问你现在解决了吗
抱歉很久没用了,不太记得了,如果还有同样的问题新开一个issue问问吧
运行
python hugo-encryptor.py
出现如下错误: