jwons / MultilingualProvenanceDebugger

GNU General Public License v3.0
2 stars 1 forks source link

ProvExplorer fails when variable lifecycles are called #7

Open fmnguyen opened 2 years ago

fmnguyen commented 2 years ago

When calling 'pvd.getVarLifeCycles' on a node, the script errors out.

./joe-new-test-data/datasets-doi-10-7910-DVN-DZQDQO-Winters_Capture_Replication_Figure1/prov.json
Traceback (most recent call last):
  File "convert.py", line 114, in <module>
    lifecycles = prov_explorer.getVarLifeCycles(index)
  File "/Users/FrancisNguyen/opt/anaconda3/envs/plover/lib/python3.8/site-packages/provdebug-0.41-py3.8.egg/provdebug/ProvExplorer.py", line 576, in getVarLifeCycles
    initialLabel = varNodes.iloc[0]["label"]
  File "/Users/FrancisNguyen/opt/anaconda3/envs/plover/lib/python3.8/site-packages/pandas-1.4.0-py3.8-macosx-10.9-x86_64.egg/pandas/core/indexing.py", line 967, in __getitem__
    return self._getitem_axis(maybe_callable, axis=axis)
  File "/Users/FrancisNguyen/opt/anaconda3/envs/plover/lib/python3.8/site-packages/pandas-1.4.0-py3.8-macosx-10.9-x86_64.egg/pandas/core/indexing.py", line 1520, in _getitem_axis
    self._validate_integer(key, axis)
  File "/Users/FrancisNguyen/opt/anaconda3/envs/plover/lib/python3.8/site-packages/pandas-1.4.0-py3.8-macosx-10.9-x86_64.egg/pandas/core/indexing.py", line 1452, in _validate_integer
    raise IndexError("single positional indexer is out-of-bounds")
IndexError: single positional indexer is out-of-bounds
fmnguyen commented 2 years ago

When correctly calling the function with a variable name, file still fails:

Node variable name: CaptureTargetOrder.pdf
Traceback (most recent call last):
  File "/Users/FrancisNguyen/opt/anaconda3/envs/plover/lib/python3.8/site-packages/pandas-1.4.0-py3.8-macosx-10.9-x86_64.egg/pandas/core/indexes/base.py", line 3621, in get_loc
    return self._engine.get_loc(casted_key)
  File "pandas/_libs/index.pyx", line 136, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/index.pyx", line 163, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/hashtable_class_helper.pxi", line 5198, in pandas._libs.hashtable.PyObjectHashTable.get_item
  File "pandas/_libs/hashtable_class_helper.pxi", line 5206, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'label'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "convert.py", line 115, in <module>
    lifecycles = prov_explorer.getVarLifeCycles(row["name"])
  File "/Users/FrancisNguyen/opt/anaconda3/envs/plover/lib/python3.8/site-packages/provdebug-0.41-py3.8.egg/provdebug/ProvExplorer.py", line 587, in getVarLifeCycles
    lineageProcs = self.getNodeLifeCycle(initialLabel, procNodes)
  File "/Users/FrancisNguyen/opt/anaconda3/envs/plover/lib/python3.8/site-packages/provdebug-0.41-py3.8.egg/provdebug/ProvExplorer.py", line 617, in getNodeLifeCycle
    lineageProcs = [initialNode] + list(self._processLabel(initialLabel, procNodes, forward=True)["label"].to_numpy())
  File "/Users/FrancisNguyen/opt/anaconda3/envs/plover/lib/python3.8/site-packages/pandas-1.4.0-py3.8-macosx-10.9-x86_64.egg/pandas/core/frame.py", line 3506, in __getitem__
    indexer = self.columns.get_loc(key)
  File "/Users/FrancisNguyen/opt/anaconda3/envs/plover/lib/python3.8/site-packages/pandas-1.4.0-py3.8-macosx-10.9-x86_64.egg/pandas/core/indexes/base.py", line 3623, in get_loc
    raise KeyError(key) from err
KeyError: 'label'