Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alex Task help me solve this bug please, 10 min Task #203

Open
spickering-git opened this issue Dec 16, 2017 · 3 comments
Open

Alex Task help me solve this bug please, 10 min Task #203

spickering-git opened this issue Dec 16, 2017 · 3 comments
Assignees
Labels

Comments

@spickering-git
Copy link

Why does this code
image

fail here

total_pl_change = pnl_values['pnls']['SettleChange'].iloc[-1]

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.

@alexveden
Copy link
Contributor

image
Try to understand what pnl_values are. I believe that pnl_values is dictionary and the 'SettleChange' is pandas dataframe. Probably it's empty.

@spickering-git
Copy link
Author

same code works in notebook here
https://10.0.1.2:8888/notebooks/tools/All_Production_Campaign_Settlements-Product-Separated_Pnls-TEST-Loop.ipynb
image

so maybe some sort of version bug?
@alexveden what do you think?

@alexveden
Copy link
Contributor

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants