OasisLMF / ReinsuranceTestTool

Test tool for new reinsurance functionality.
BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link

feature/ri_determininstic_layer notebook bug on step 2 #77

Closed johcarter closed 5 years ago

johcarter commented 5 years ago

TypeError Traceback (most recent call last)

in 21 ri_scope_df, 22 do_reinsurance ---> 23 ) = oed.load_oed_dfs(oed_dir, show_all=False) ~/lfs_ReinsuranceTestTool_MDK/venv3/lib/python3.6/site-packages/oasislmf/exposures/oed.py in load_oed_dfs(oed_dir, show_all) 265 oed_ri_info_file, lowercase_cols=False, 266 required_cols=RI_INFO_REQUIRED_COLS, --> 267 default_values=RI_INFO_DEFAULTS) 268 ri_scope_df = get_dataframe( 269 oed_ri_scope_file, lowercase_cols=False, TypeError: get_dataframe() got an unexpected keyword argument 'default_values'
sr-murthy commented 5 years ago

This is an easy fix - the optional argument to set column defaults is named defaulted_cols

https://github.com/OasisLMF/OasisLMF/blob/develop/oasislmf/utils/data.py#L25

So you just need to change the way you're calling get_dataframe

sr-murthy commented 5 years ago

@joh It appears the wrong version of MDK is being used or installed in your local Python 3 virtual env. The exposures subpackage was renamed to model_preparation. As the oed.py module path that appears in that error message is

oasislmf/exposures/oed.py

that indicates that you need to uninstall your local version of MDK, and then reinstall the current develop version using

pip uninstall -y oasislmf && pip install -v git+ssh://git@github.com/OasisLMF/OasisLMF.git@develop#egg=oasislmf
mpinkerton-oasis commented 5 years ago

You should actually use the branch feature/ri_deterministic_loss . This is recent branch of develop.

sr-murthy commented 5 years ago

So the installation command is

pip uninstall -y oasislmf && pip install -v git+ssh://git@github.com/OasisLMF/OasisLMF.git@feature/ri_deterministic_loss#egg=oasislmf
johcarter commented 5 years ago

user error