vectorbt icon indicating copy to clipboard operation
vectorbt copied to clipboard

Bug while trying to 'infer_objects'

Open andreas-vester opened this issue 1 year ago • 3 comments

Lately, the following two lines have been inserted (v0.25.1).

https://github.com/polakowo/vectorbt/blob/da256514d426d0801d2558758055607a8a379b27/vectorbt/data/base.py#L695-L696

This code change seems to be responsible for a bug.

I created a custom BloombergData provider. I have some test data with two securities, which only have open prices. The prices are of float64 dtype. I should mention, that the two price series are not of the same length.

Calling something like prices.get("open") will lead to an error, which can be attributed to the above mentioned code lines.

Unfortunately, I am not able to post the exact Traceback (due to corporate restrictions), but the essence is this:

TypeError: NDFrame.infer_objects() got an unexpected keyword argument 'copy'

andreas-vester avatar May 16 '23 14:05 andreas-vester

Having the same issue here, I tried running the code in the README and had the same error.

ShreyJ1729 avatar May 23 '23 23:05 ShreyJ1729

Thanks for reporting, will be fixed today.

polakowo avatar May 24 '23 01:05 polakowo

Fixed in 0.25.3.

polakowo avatar May 24 '23 02:05 polakowo