-
Notifications
You must be signed in to change notification settings - Fork 12
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
AttributeError: '_io.TextIOWrapper' object has no attribute 'startswith' #104
Comments
I initially opened an issue with
|
Found this too https://stackoverflow.com/questions/65998183/python-dask-module-error-attributeerror-io-textiowrapper-object-has-no-at from a few days ago. Added a comment asking if they managed to figure it out. Update: I fixed their issue https://stackoverflow.com/a/66110233/393634. |
So, I've found the issue. The code here (https://github.com/BioMeCIS-Lab/OpenOmics/blob/master/openomics/utils/read_gtf.py#L178-L179) is the problem:
Specifically passing
However, the The parameter list defines the following:
|
This might help? https://stackoverflow.com/q/39924518/393634 🤔 Specifically this answer https://stackoverflow.com/a/46428853/393634. I don't think we need to do the decompression here https://github.com/BioMeCIS-Lab/OpenOmics/blob/master/openomics/database/base.py#L80-L106. I think, perhaps, we can just pass through the file path as is and let the |
@gawbul Thank you so much for getting to the bottom of this issue. Amazing to see the detective work in action! So originally, my intention was to have Dask handle the I've just tried Will be applying the fix and refactoring codes. I'll close this when it's done. |
I added this line openomics/database/base.py#L74 which now only lets dask handles uncompression when dealing with GTF files. Running I also added some functionalities to parse attributes from GTF files into Dask dataframes at |
Awesome 🥳 Glad you managed to get this sorted 🙂 |
Description
Trying to run the vignettes from the README:
What I Did
I added the text from the vignette above to a file called
openomics_test.py
and ran the following command:I received the following output:
The text was updated successfully, but these errors were encountered: