pyam icon indicating copy to clipboard operation
pyam copied to clipboard

Unexpected failures with incorrect permissions in the IIASA database system

Open danielhuppmann opened this issue 2 years ago • 0 comments

When a user has access to a Scenario Explorer database instance but no permission to view any models (or no scenarios exist), querying data from the API fails with an error similar to

  if nmissing == len(indexer):
      if use_interval_msg:
          key = list(key)
              raise KeyError(f"None of [{key}] are in the [{axis_name}]")
E KeyError: "None of [Index(['model', 'scenario', 'version', 'is_default', 'run_id'], dtype='object')] are in the [columns]"

The pyam.iiasa module should check that a response exists before casting to an IamDataFrame.

danielhuppmann avatar Jun 28 '22 12:06 danielhuppmann