attributeerror: module 'urwid' has no attribute 'str_util' beeprint
Closed this issue · 2 comments
east-before-dawn commented
Traceback (most recent call last):
File "z:\data\python\virtualenvs\scrapy\lib\site-packages\twisted\internet\defer.py", line 654, in _ru
nCallbacks
current.result = callback(current.result, *args, **kw)
File "Z:\Github(east-before-dawn)\Scrapy_Project\scrapy_project\spiders\login.py", line 33, in parse_s
tart_url
pp("登录失败")
File "z:\data\python\virtualenvs\scrapy\lib\site-packages\beeprint\printer.py", line 66, in pp
res = str(Block(config, Context(obj=o)))
File "z:\data\python\virtualenvs\scrapy\lib\site-packages\beeprint\models\block.py", line 42, in __str
__
return self.build_block()
File "z:\data\python\virtualenvs\scrapy\lib\site-packages\beeprint\models\block.py", line 154, in buil
d_block
ret += self.ctn.write(indent_cnt * self.config.indent_char + str(rb) + ustr(tail + '\n'))
File "z:\data\python\virtualenvs\scrapy\lib\site-packages\beeprint\models\block.py", line 42, in __str
__
return self.build_block()
File "z:\data\python\virtualenvs\scrapy\lib\site-packages\beeprint\models\block.py", line 591, in buil
d_block
return handler(self.ctx, self.typ)
File "z:\data\python\virtualenvs\scrapy\lib\site-packages\beeprint\models\block.py", line 710, in ca
ll
return self.rearrenge(ctx, typ, wrapper)
File "z:\data\python\virtualenvs\scrapy\lib\site-packages\beeprint\models\block.py", line 720, in rear
renge
left_margin = calc_left_margin(ctx, wrapper)
File "z:\data\python\virtualenvs\scrapy\lib\site-packages\beeprint\helpers\string.py", line 54, in cal
c_left_margin
left_margin = calc_width(left_filling)
File "z:\data\python\virtualenvs\scrapy\lib\site-packages\beeprint\helpers\string.py", line 17, in cal
c_width
return urwid.str_util.calc_width(s, 0, len(s))
AttributeError: module 'urwid' has no attribute 'str_util'
urwid 2.10
python 3.6
panyanyany commented
urwid 版本可能太高了,安装这个试试 urwid==1.3.1
east-before-dawn commented
谢谢,我试试
Sent with [ProtonMail](https://protonmail.com) Secure Email.
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
2020年7月16日星期四下午3点03分,panyanyany <notifications@github.com> 来信:
… Closed [#27](#27).
—
You are receiving this because you authored the thread.
Reply to this email directly, [view it on GitHub](#27 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AOF2BKQBVETEHZU3QFSUINDR32Q5LANCNFSM4N3FQ7CA).