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

'IOHandles' #337

Closed
yardenmatok203 opened this issue Jul 11, 2023 · 5 comments · Fixed by #384
Closed

'IOHandles' #337

yardenmatok203 opened this issue Jul 11, 2023 · 5 comments · Fixed by #384

Comments

@yardenmatok203
Copy link

Hey,

When using cool cload pairs, I get the following:

/python3.8/site-packages/cooler/cli/cload.py", line 551, in pairs
f_in = get_handle(pairs_path, mode='r', compression='infer')[0]
TypeError: 'IOHandles' object is not subscriptable

I will be happy for help!

thanks,
yarden

@luoxun-xl
Copy link

luoxun-xl commented Jul 20, 2023

Hi, I also came across the problem, and the version of Cooler is 0.9.2. However, the error disappears when I downgrade it to v0.9.1. This may be caused by inconsistencies between the pandas version and the cooler version.

And, the below version works,

- python=3.8.17
- cooler=0.9.1
- pandas=1.5.3

@nvictus
Copy link
Member

nvictus commented Jul 20, 2023

This appears to be due to some behavior in an old pandas version we haven't accounted for.

Upgrading to the latest possible pandas that supports your python version might fix it. If not, please share which version of pandas causes the error, and your python version.

If you can upgrade to pandas >=2, it should work. Note that pandas 2 only works on py38 or later.

@luoxun-xl
Copy link

luoxun-xl commented Jul 23, 2023

This appears to be due to some behavior in an old pandas version we haven't accounted for.

Upgrading to the latest possible pandas that supports your python version might fix it. If not, please share which version of pandas causes the error, and your python version.

If you can upgrade to pandas >=2, it should work. Note that pandas 2 only works on py38 or later.

Yes, the below version combination also works,

- cooler=0.9.2
- pandas=2.0.3

@yardenmatok203
Copy link
Author

yardenmatok203 commented Aug 6, 2023

thanks!

now I get the following error:

pandas.errors.ParserError: Too many columns specified: expected 3 and found 2

Thanks a lot,
Yarden

@bskubi
Copy link

bskubi commented Nov 6, 2023

I also ran into this issue with pandas 1.5.1 and cooler 0.9.3. Upgrading to pandas 2.1.2 fixed the problem. Thanks!

@nvictus nvictus linked a pull request Feb 1, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants