0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

入門Python3 正誤表 P267- オライリー本 BillLubanovic

Last updated at Posted at 2020-01-26

[入門Python3 BillLubanovic著」を、読んでうまく動かなかったところのメモです。

不具合 P267
(P.267)conn.zadd('logins', 'smeagol', now) で下記のエラーが出る。

conn.zadd('logins', 'smeagol', now)
Traceback (most recent call last):
File "", line 1, in
File "/home/ec2-user/.local/lib/python3.6/site-packages/redis/client.py", line 2388, in zadd
for pair in iteritems(mapping):
File "/home/ec2-user/.local/lib/python3.6/site-packages/redis/_compat.py", line 161, in iteritems
return iter(x.items())
AttributeError: 'str' object has no attribute 'items'

対策
$ pip install "redis < 3"
のように、Redisのバージョンを下げたら 動作するようになりました。

参考記事
https://github.com/rq/rq-scheduler/issues/197

その他

Skype理工学勉強会では、同書の読書写経会をしています。
Skype上の無料オンライン会です。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?