Repository navigation
Conversation
| try: | ||
| from Bio.Align import _aligners | ||
| except ImportError as e: | ||
| new_exc = ImportError("""{}: you should not import directly from the |
There was a problem hiding this comment.
Don't use a triple quote string, which inserts the new lines breaks as is. Use single quotes (which will auto-concatenate)
Codecov Report
@@ Coverage Diff @@
## master #1736 +/- ##
==========================================
- Coverage 85.57% 85.15% -0.42%
==========================================
Files 331 331
Lines 50086 50091 +5
==========================================
- Hits 42859 42657 -202
- Misses 7227 7434 +207
Continue to review full report at Codecov.
|
|
TravisCI failure linked to ReportLab, see #1737 1737 |
|
TravisCI failure caused by #1737 (latest ReportLab release). |
|
Looks good to me. As this error typically appears when a user runs "python setup.py install" and directly afterwards tries to import Bio, some day we should reorganize the directory structure such that Bio/ etc. is not a direct subdirectory of biopython, then this error is unlikely to happen at all. |
This pull request relates to an issue raised on the mailing list here. I also saw the same question asked on Stack overflow here, and I then later independently encountered the issue myself because I had used some soft links rather than doing a proper install. The error can occur on a few imports, for example:
I found the error slightly cryptic until I read through the mailing list thread, and perhaps I am not alone. Michiel noted in the mailing list thread here that
numpyhave a more informative traceback, I suggest modifying the traceback in this case in a similar way:Thoughts?
I hereby agree to dual licence this and any previous contributions under both
the Biopython License Agreement AND the BSD 3-Clause License.
I have read the
CONTRIBUTING.rstfile and understand that AppVeyor andTravisCI will be used to confirm the Biopython unit tests and
flake8stylechecks pass with these changes.
I have added my name to the alphabetical contributors listings in the files
NEWS.rstandCONTRIB.rstas part of this pull request, am listedalready, or do not wish to be listed. (This acknowledgement is optional.)