AttributeError: 'list' object has no attribute 'items ...
stackoverflow.com › questions › 63137007Jul 28, 2020 · When I try to parse the list with .item ()s it returns AttributeError: 'list' object has no attribute 'items' Nothing ive tried so far has worked. import xmltodict from collections import defaultdict dependencyInfo = defaultdict (list) with open ("pom.xml") as f: parse_ = xmltodict.parse (f.read ()).get ('project', {}) for d in parse_.get ("dependencies", {}).get ("dependency", []): dependencyInfo [d ['groupId']].append ( {"artifactId": d ['artifactId'], 'version': d ['version']}) for ...