TA的每日心情 | 奋斗 2020-12-22 18:46 |
---|
签到天数: 43 天 [LV.5]常住居民I
|
发表于 2019-10-29 16:45:45
|
显示全部楼层
大神,我有点没看懂帖子介绍的mac词典导出放大,我在推荐的apple dictionary主页找到了一条py代码并运行,显示出了这样的报错,请问该怎么办!9 J' N' r; p i
Traceback (most recent call last):
2 j4 D# U% q: W7 q1 D: M File "/Users/xxx/Downloads/macdictexport/0dedict.py", line 31, in <module> }/ `0 F2 _! x# I: U% l
for word, definition in gen_entry():4 z( ~1 m8 W: _- y8 g e5 w' |! I
File "/Users/xxx/Downloads/macdictexport/0dedict.py", line 26, in gen_entry
7 p/ v, V' X& y: G7 ^, R3 C title = re.search('d:title="(.*?)"', entry).group(1)
9 d& y- f( p! e. _ V' U8 b( \ File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/re.py", line 199, in search
7 d7 Z, l, z4 C/ a1 w8 O/ C1 t2 @8 D return _compile(pattern, flags).search(string)$ s: I# p2 ~+ p8 ^
TypeError: cannot use a string pattern on a bytes-like object; G' j( h/ a3 Q6 }8 y& U# L# m
>>> |
|