-
Notifications
You must be signed in to change notification settings - Fork 664
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
warning that duecredit is not installed when loading package #1872
Comments
For the record (using Python 3.6 on macOS) in a conda environment without duecredit gives: cat > credit.py << 'EOF'
import MDAnalysis
print(MDAnalysis.__version__)
EOF
python credit.py gives
|
It raises a EDIT: removed stuff on how I was to dumb to check if |
@orbeckst we used to have some tests that tested for deprecation warnings or something, I think we deleted the dict entry from |
Btw, the Python docs say https://docs.python.org/3/library/exceptions.html#ModuleNotFoundError
The following does catch that In [12]: try:
...: raise ModuleNotFoundError("foo")
...: except ImportError as err:
...: print("Import error", err)
...:
Import error foo |
I just can't read code anymore... the exceptions work as they should, I just have to remove the debugging code :-p mdanalysis/package/MDAnalysis/due.py Line 88 in 8c331d7
|
- fix #1872 - Do not show a warning if duecredit is not installed; if users want the functionality they can install duecredit but we should not bother all others. - NOTE: This was manually tested in a local installation without duecredit but doing a real unit test is difficult and has not been attempted.
- fix #1872 - Do not show a warning if duecredit is not installed; if users want the functionality they can install duecredit but we should not bother all others. - NOTE: This was manually tested in a local installation without duecredit but doing a real unit test is difficult and has not been attempted.
I'm still getting the same warning with MDAnalysis 0.18.0 in a fresh environment: $ python -c "import MDAnalysis as mda; import sys; print(mda.__version__); print(sys.version);"
/home/mischi/.virtualenvs/test-oN5qujzB/lib/python3.6/site-packages/MDAnalysis/due.py:88: UserWarning: No module named 'duecredit'
warnings.warn(str(err))
0.18.0
3.6.5 (default, Apr 14 2018, 13:17:30)
[GCC 7.3.1 20180406] |
This error is fixed in the next release |
I first saw the same warning. But after I install the |
@rainbeeliu the dependencies are correct in that |
Expected behaviour
no warning when loading the module
Actual behaviour
warning that duecredit is not installed.
Currently version of MDAnalysis:
(run
python -c "import MDAnalysis as mda; print(mda.__version__)"
)0.18.0
The text was updated successfully, but these errors were encountered: