Skip to content

Problem during conversion #1

Description

@maggix

Hello, I am trying to convert a .json file which breaks the script.

Traceback (most recent call last):
File "json2csv.py", line 74, in <module>
main()
File "json2csv.py", line 61, in main
value = item.get(key, '')
AttributeError: 'unicode' object has no attribute 'get'

JSON file is nothing special.

[
{
"type": "node",
"id": 259778678,
"lat": 45.4964729,
"lon": 9.2481738,
"tags": {
"amenity": "waste_basket"
}
},
{
"type": "node",
"id": 611917417,
"lat": 45.5718222,
"lon": 9.2082012,
"tags": {
"amenity": "waste_basket",
"source": "survey"
}
]

Has it something to do with the "nested" attributes?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions