wayback_google_analytics/output.py", line 101, in get_urls_df
"UA_Code": info["current_UA_code"],
KeyError: 'current_UA_code'
This is due, I believe, to this code section where the keys are assigned, but only if the html variable is not None.
One simple solution is to do dict.get instead of dict[] for the optionally present parameters, eg: info.get("current_UA_code", ""), but I wonder if there's some missing logic between the 2 different parts and if there's a better way to address it.
This is due, I believe, to this code section where the keys are assigned, but only if the
html
variable is not None.One simple solution is to do dict.get instead of dict[] for the optionally present parameters, eg:
info.get("current_UA_code", "")
, but I wonder if there's some missing logic between the 2 different parts and if there's a better way to address it.