Open spickering-git opened 6 years ago
Try to understand what pnl_values are. I believe that pnl_values is dictionary and the 'SettleChange' is pandas dataframe. Probably it's empty.
same code works in notebook here https://10.0.1.2:8888/notebooks/tools/All_Production_Campaign_Settlements-Product-Separated_Pnls-TEST-Loop.ipynb
so maybe some sort of version bug? @alexveden what do you think?
@spickering-git
it's hard to say without seeing contents of pnl_values['pnls']['SettleChange']
in the debugger.
Try to delete try/catch block to see the traceback this error, or launch it in the debugger.
Why does this code
fail here https://github.com/trendmanagement/tmqrexo_alexveden/blob/dca33b21ecd83497d5759c030ceb57e158de2bf0/scripts/smart_campaign_daily.py#L71
and throw XXX lineno: 71, opcode: 0 unknown opcode
It is running your code to get the pnls Then tries to extract pnls and crashes.