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

Conda installation problems: AttributeError: module 'os' has no attribute 'io' #8

Closed
caity-s opened this issue Dec 12, 2019 · 2 comments

Comments

@caity-s
Copy link

caity-s commented Dec 12, 2019

Hello,

I am excited to try AGB, I have been using bandage. The installation goes smoothly, and I can -h, however I get an error when I try to run the program. I made the conda env using Miniconda3 as described:

conda create -c almiheenko -c bioconda -n AGB agb
conda activate AGB
agb.py -i flye/ -a Flye
Extracting edge sequences from flye/assembly_graph.gfa...
No information about contig mappings to the reference genome
No information about edge mappings to the reference genome
Building JSON files...
Traceback (most recent call last):
  File "/shared-nfs/MGP1000/software/condaenvs/AGB/bin/agb.py", line 154, in <module>
    main()
  File "/shared-nfs/MGP1000/software/condaenvs/AGB/bin/agb.py", line 147, in main
    html = embed_css_and_scripts(html)
  File "/shared-nfs/MGP1000/software/condaenvs/AGB/lib/python3.6/site-packages/agb_src/scripts/utils.py", line 221, in embed_css_and_scripts
    with os.io.open(fpath, 'r', encoding="utf-8") as f: contents = f.read()
AttributeError: module 'os' has no attribute 'io'

agb.py --graph assembly_graph.gfa -a Flye
Parsing assembly_graph.gfa...
Finish parsing.
Extracting edge sequences from assembly_graph.gfa...
No information about contig mappings to the reference genome
No information about edge mappings to the reference genome
Building JSON files...
Traceback (most recent call last):
  File "/shared-nfs/MGP1000/software/condaenvs/AGB/bin/agb.py", line 154, in <module>
    main()
  File "/shared-nfs/MGP1000/software/condaenvs/AGB/bin/agb.py", line 147, in main
    html = embed_css_and_scripts(html)
  File "/shared-nfs/MGP1000/software/condaenvs/AGB/lib/python3.6/site-packages/agb_src/scripts/utils.py", line 221, in embed_css_and_scripts
    with os.io.open(fpath, 'r', encoding="utf-8") as f: contents = f.read()
AttributeError: module 'os' has no attribute 'io'

Should I install another piece of software?

Thank you,
Caity

@AnnaSyme
Copy link

Hi, I am having this same issue.

Installed with:

conda create -c almiheenko -c bioconda -n AGB agb

error:

agb.py -i flye-nohup/ -a flye 
Extracting edge sequences from flye-nohup/assembly_graph.gfa...
No information about contig mappings to the reference genome
No information about edge mappings to the reference genome
Building JSON files...
Traceback (most recent call last):
  File "/home/anna/miniconda3/envs/AGB/bin/agb.py", line 154, in <module>
    main()
  File "/home/anna/miniconda3/envs/AGB/bin/agb.py", line 147, in main
    html = embed_css_and_scripts(html)
  File "/home/anna/miniconda3/envs/AGB/lib/python3.6/site-packages/agb_src/scripts/utils.py", line 221, in embed_css_and_scripts
    with os.io.open(fpath, 'r', encoding="utf-8") as f: contents = f.read()
AttributeError: module 'os' has no attribute 'io'

This seems to be the same or similar issue to @TomHarrop
#3 (comment)?

Many thanks if any ideas!

Anna

kbseah added a commit to kbseah/AGB that referenced this issue May 5, 2020
 * fix typo for `io.open`
 * write HTML output as UTF-8 because template read as UTF-8
almiheenko added a commit that referenced this issue May 5, 2020
Fix encoding error (issues #3 and #8)
@almiheenko
Copy link
Owner

This issue should be fixed by now, thanks to @kbseah.
Conda package is updated.

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

3 participants