gmr / flatdict

Python module for interacting with nested dicts as a single level dict with delimited keys.
https://flatdict.readthedocs.io
BSD 3-Clause "New" or "Revised" License
112 stars 32 forks source link

Complex Dict Support #5

Closed DaveL17 closed 6 years ago

DaveL17 commented 8 years ago

Great module. Ran across this error when trying to flatten a JSON return from Weather Underground:

http://api.wunderground.com/api/API_KEY/conditions/q/CA/San_Francisco.json

Traceback (most recent call last):
  File "plugin.py", line 208, in getJSON
  File "/Library/..../flatdict.py", line 28, in __init__
  File "/Library/..../flatdict.py", line 74, in __setitem__
  File "/Library/..../flatdict.py", line 28, in __init__
  File "/Library/..../flatdict.py", line 74, in __setitem__
  File "/Library/..../flatdict.py", line 28, in __init__
  File "/Library/..../flatdict.py", line 83, in __setitem__
<type 'exceptions.TypeError'>: Top level node is not a FlatDict: country

Not sure whether this might be related to #2 or #3.

gmr commented 6 years ago

This should be resolved in 2.0