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

pod5 filter/ subset failed with TypeError: enable_string_cache() missing 1 required positional argument: 'enable' #105

Closed
jkh00 opened this issue Dec 28, 2023 · 3 comments

Comments

@jkh00
Copy link

jkh00 commented Dec 28, 2023

Hi,

I am trying to demultiplex my pod5 files using pod5 subset or pod5 filter, however I'm always getting error stating:

TypeError: enable_string_cache() missing 1 required positional argument: 'enable'

The full command used:

POD5_DEBUG=1 pod5 filter PAS86942_375dd100_f2dee0dd_0.pod5 --ids all_ids.txt --output 1k.pod5 --missing-ok

The error output:

Traceback (most recent call last):
File "/home-directory/miniconda3/envs/pod5/bin/pod5", line 8, in
sys.exit(main())
File "/home-directory/miniconda3/envs/pod5/lib/python3.8/site-packages/pod5/tools/main.py", line 60, in main
return run_tool(parser)
File "/home-directory/miniconda3/envs/pod5/lib/python3.8/site-packages/pod5/tools/parsers.py", line 41, in run_tool
raise exc
File "/home-directory/miniconda3/envs/pod5/lib/python3.8/site-packages/pod5/tools/parsers.py", line 38, in run_tool
return tool_func(**kwargs)
File "/home-directory/miniconda3/envs/pod5/lib/python3.8/site-packages/pod5/tools/parsers.py", line 288, in run
from pod5.tools.pod5_filter import filter_pod5
File "/home-directory/miniconda3/envs/pod5/lib/python3.8/site-packages/pod5/tools/pod5_filter.py", line 27, in
from pod5.tools.pod5_subset import (
File "/home-directory/miniconda3/envs/pod5/lib/python3.8/site-packages/pod5/tools/pod5_subset.py", line 43, in
pl.enable_string_cache()
TypeError: enable_string_cache() missing 1 required positional argument: 'enable'

The pod5 version I'm using is v0.3.2 and I have also downgraded my polar version to 0.19 using this command pip install -U polars==0.19 according to suggestion from this issue.

The read ids were obtained using pod5 view and it works perfectly fine. I wonder if this is an issue related to the version of polar I used, but I haven't seen anyone raising the same issue.

Any input will be helpful, thanks!

@HalfPhoton
Copy link
Collaborator

Hi @jkh00 ,

Based on the polars enable_string_cache documentation [0.19] there is no required positional argument.
This implies that you don't have the latest polars 0.19 version.

Can you please double check this?

Kind regards,
Rich

@jkh00
Copy link
Author

jkh00 commented Jan 3, 2024

Hi Rich,

I solved the issue by updating polars to 0.19.7, my previous version was 0.19.0 and according to the documentation, updates for enable_string_cache was after 0.19.3 so I guess that was the problem. I am able to run the commands now. Thanks for the help!

Kind regards,
Jin

@HalfPhoton
Copy link
Collaborator

Hi @jkh00 ,
Thanks for getting back to us.
We will be releasing an update shortly to support polars 0.20.

Kind regards,
Rich

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

No branches or pull requests

2 participants