Python Forum
can´t store the mbid - `KeyError: 'mbid'`.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
can´t store the mbid - `KeyError: 'mbid'`.
#8
The error means: There is no key "mbid" in track_data.
You can not trust data from the internet.
You have to check each key for existence.


Sample:
#!/usr/bin/python3

dd = { "a": "aa" }

print(dd["a"])
print(dd["x"])   # <==  KeyError 'x'
Reply


Messages In This Thread
RE: can´t store the mbid - `KeyError: 'mbid'`. - by heiner55 - Nov-26-2017, 04:47 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020