TA的每日心情 | 奋斗 2020-12-22 18:46 |
---|
签到天数: 43 天 [LV.5]常住居民I
|
发表于 2019-10-29 17:45:28
|
显示全部楼层
大神,我有点没看懂帖子介绍的mac词典导出放大,我在推荐的apple dictionary主页找到了一条py代码并运行,显示出了这样的报错,请问该怎么办!
. p' U0 }+ R# qTraceback (most recent call last):/ b9 \. q& Z6 Q- @3 q' a$ i0 c
File "/Users/xxx/Downloads/macdictexport/0dedict.py", line 31, in <module>
- {6 E% [1 B7 {$ | K( Y% \$ Q for word, definition in gen_entry():
# b, |( x* E9 I( T" ` File "/Users/xxx/Downloads/macdictexport/0dedict.py", line 26, in gen_entry) W& S& {- |! v
title = re.search('d:title="(.*?)"', entry).group(1)! L/ M# A' D$ j5 |/ \: \* n
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/re.py", line 199, in search
3 x3 Y) K$ c( Z& b5 n return _compile(pattern, flags).search(string)
7 O( ]/ a& E! f v% fTypeError: cannot use a string pattern on a bytes-like object
! f: o1 U" V% h% }6 @5 U>>> |
|