LoginSignup
0
0

Attrdictをimportする時に、 ImportError: cannot import name 'Mapping' from 'collections'

Last updated at Posted at 2023-09-11

エラー

Attrdictをimportする時に、
ImportError: cannot import name 'Mapping' from 'collections'
(/Users/***/anaconda3/lib/python3.10/collections/init.py)
Output is truncated.
スクリーンショット 2023-09-11 17.25.05.png

解決方法:

矢印(---->)マークのあるエラー文からattrdictのファイルへアクセスして、

from collections import Mapping, MutableMapping, Sequence

importの部分の上記のcollectionsを下記のようにcollections.abcに書き換える。

from collections.abc import Mapping, MutableMapping, Sequence
0
0
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
0