mattsta / icli

interactive brokers ibkr api command line interface cli giving you the fastest way to lose all your money
Other
84 stars 19 forks source link

pos error #9

Closed vsr2158 closed 2 months ago

vsr2158 commented 3 months ago
live> pos
/home/ubuntu/_code/icli/icli/lang.py:2591: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise in a future error of pandas. Value '['0.00']' has dtype incompatible with int64, please explicitly cast to a compatible dtype first.
  df.loc[:, simpleCols] = df[simpleCols].map(lambda x: f"{x:,.2f}")
2024-03-30 01:52:58.621 | INFO     | icli.lang:run:2745 - All Positions :: Row count: 1
2024-03-30 01:52:58.630 | FRAME    | icli.lang:run:2745 -
      type sym PC date strike exch position averageCost marketPrice closeOrder closeOrderValue marketValue totalCost unrealizedPNL dailyPNL     %    w%
Total                                     0                                                           0.00      0.00          0.00     0.00  0.00  0.00
2024-03-30 01:52:58.633 | INFO     | icli.cli:dorepl:2903 - [pos] Duration: 0.0301
mattsta commented 3 months ago

Yeah, there are some pandas warnings in places I haven't tracked down how to fix yet.

pandas continues to make their system more strongly typed and they add more warnings on every new update, so things that used to "just work" now require type conversions everywhere or the system yells at you.

These warnings will continue to get cleaned up over time (eventually).

vsr2158 commented 3 months ago

Heard good things about Polaris..not sure how big of a lift it is to move to that in the future.

mattsta commented 2 months ago

Fixed this one here: https://github.com/mattsta/icli/commit/c3a553f59eeb01a44d327390b0541ede7e339dc9

it was due to us not pinning the pandas version directly and I hadn't updated my local dependencies in a while, so new installs were running newer pandas than I had tested. It's fine for now, but we can always make the deps more strict if upstream continues modifying a two decade stable API out from under us.