ig-python / trading-ig

A lightweight Python wrapper for the IG Markets API
https://trading-ig.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
308 stars 196 forks source link

ValueError: columns cannot be a set #275

Closed oliverpolden closed 1 year ago

oliverpolden commented 1 year ago

I'm trying to update my code to use the latest version of trading_ig and I'm getting the error below. Can anyone help please? Python 3.10 Pandas 1.5.2 File "site-packages/trading_ig/rest.py", line 895, in fetch_open_positions data = pd.DataFrame(columns=self.colname_unique(cols)) File "site-packages/pandas/core/frame.py", line 639, in init raise ValueError("columns cannot be a set") ValueError: columns cannot be a set

oliverpolden commented 1 year ago

If I downgrade Pandas to 1.4.4 then this error goes away.

bug-or-feature commented 1 year ago

@oliverpolden this sounds like #270. That issue already has a fix committed, but it has not yet been included in a release. Until that happens, you could either reference this project's latest commit, or use a pandas version earlier than 1.5.2

bug-or-feature commented 1 year ago

0.0.19 released today includes the fix for #270