mordred-descriptor / mordred

a molecular descriptor calculator
http://mordred-descriptor.github.io/documentation/master/
BSD 3-Clause "New" or "Revised" License
340 stars 91 forks source link

list index error while using Mordred #74

Open vaibhavadixit opened 5 years ago

vaibhavadixit commented 5 years ago

description I am facing the following error trying to use Mordred in anaconda prompt. The module was working fine last week and I did generate expected ouput.csv files with descriptors, but it is now giving the error given below. The test job is also giving some errors (given below). Can you please take a look and suggest me how to fix these errors? Thank you and regards Dr. Vaibhav A. Dixit, Assistant Professor, Department of Pharmacy, ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ Birla Institute of Technology and Sciences Pilani (BITS-Pilani), VidyaVihar Campus, street number 41, Pilani, 333031, Rajasthan. India Phone No. +91 1596 255652, Mob. No. +91-7709129400, Email: vaibhav.dixit@pilani.bits-pilani.ac.in, vaibhavadixit@gmail.com ​http://www.bits-pilani.ac.in/pilani/vaibhavdixit/profile https://www.linkedin.com/in/vaibhav-dixit-b1a07a39/ ORCID ID: https://orcid.org/0000-0003-4015-2941 http://scholar.google.co.in/citations?user=X876BKcAAAAJ&hl=en&oi=sra

minimal reproduction code

Please fill me if possible.

environment

OS/distribution

windows Please fill me.

conda or pip

conda Please choose conda or pip.

python version

Python 3.6.7 |Anaconda custom (64-bit)| (default, Oct 28 2018, 19:44:12) [MSC v.1915 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.

Please execute the command and paste result.

python --version

library version

Please execute the command and paste result.

(base) C:\Users\user\Vaibhav>python -m mordred -o output.csv CYP3A4-inhi-active-notactive.smi -3 -v Traceback (most recent call last): File "C:\Users\user\PyMOL\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "C:\Users\user\PyMOL\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\user\PyMOL\lib\site-packages\mordred__main.py", line 203, in main() File "C:\Users\user\PyMOL\lib\site-packages\mordred__main.py", line 197, in main descriptor=p.descriptor, with3D=p.with3D, verbosity=p.verbosity, File "C:\Users\user\PyMOL\lib\site-packages\mordred__main__.py", line 125, in main_process mols = list(mols) File "C:\Users\user\PyMOL\lib\site-packages\mordred\main.py", line 117, in mols = (m for i in input for m in parser(i)) File "C:\Users\user\PyMOL\lib\site-packages\mordred\main__.py", line 66, in auto_parser for m in r: File "C:\Users\user\PyMOL\lib\site-packages\mordred\main__.py", line 26, in smiles_parser smi = line[0] IndexError: list index out of range

Test jobs errors: (base) C:\Users\user\Vaibhav>python -m mordred.tests ...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E.........................E............................................................................................................................. .........................................................................................................................................................................................................E....

ERROR: Failure: ModuleNotFoundError (No module named 'yaml')

Traceback (most recent call last): File "C:\Users\user\AppData\Roaming\Python\Python36\site-packages\nose\failure.py", line 39, in runTest raise self.exc_val.with_traceback(self.tb) File "C:\Users\user\AppData\Roaming\Python\Python36\site-packages\nose\loader.py", line 418, in loadTestsFromName addr.filename, addr.module) File "C:\Users\user\AppData\Roaming\Python\Python36\site-packages\nose\importer.py", line 47, in importFromPath return self.importFromDir(dir_path, fqname) File "C:\Users\user\AppData\Roaming\Python\Python36\site-packages\nose\importer.py", line 94, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File "C:\Users\user\PyMOL\lib\imp.py", line 235, in load_module return load_source(name, filename, file) File "C:\Users\user\PyMOL\lib\imp.py", line 172, in load_source module = _load(spec) File "", line 684, in _load File "", line 665, in _load_unlocked File "", line 678, in exec_module File "", line 219, in _call_with_frames_removed File "C:\Users\user\PyMOL\lib\site-packages\mordred\tests\test_by_references.py", line 4, in import yaml ModuleNotFoundError: No module named 'yaml'

====================================================================== ERROR: Failure: ImportError (cannot import name 'AbstractMethodError')

Traceback (most recent call last): File "C:\Users\user\AppData\Roaming\Python\Python36\site-packages\nose\failure.py", line 39, in runTest raise self.exc_val.with_traceback(self.tb) File "C:\Users\user\AppData\Roaming\Python\Python36\site-packages\nose\loader.py", line 418, in loadTestsFromName addr.filename, addr.module) File "C:\Users\user\AppData\Roaming\Python\Python36\site-packages\nose\importer.py", line 47, in importFromPath return self.importFromDir(dir_path, fqname) File "C:\Users\user\AppData\Roaming\Python\Python36\site-packages\nose\importer.py", line 94, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File "C:\Users\user\PyMOL\lib\imp.py", line 235, in load_module return load_source(name, filename, file) File "C:\Users\user\PyMOL\lib\imp.py", line 172, in load_source module = _load(spec) File "", line 684, in _load File "", line 665, in _load_unlocked File "", line 678, in exec_module File "", line 219, in _call_with_frames_removed File "C:\Users\user\PyMOL\lib\site-packages\mordred\tests\test_pandas.py", line 5, in from mordred._base.pandas_module import MordredDataFrame File "C:\Users\user\PyMOL\lib\site-packages\mordred_base\pandas_module.py", line 2, in from pandas import Series, DataFrame File "C:\Users\user\PyMOL\lib\site-packages\pandas__init.py", line 42, in from pandas.core.api import * File "C:\Users\user\PyMOL\lib\site-packages\pandas\core\api.py", line 10, in from pandas.core.groupby import Grouper File "C:\Users\user\PyMOL\lib\site-packages\pandas\core\groupby\init.py", line 2, in from pandas.core.groupby.groupby import ( File "C:\Users\user\PyMOL\lib\site-packages\pandas\core\groupby\groupby.py", line 48, in from pandas.core.arrays import ExtensionArray, Categorical File "C:\Users\user\PyMOL\lib\site-packages\pandas\core\arrays\init__.py", line 1, in from .base import ExtensionArray # noqa File "C:\Users\user\PyMOL\lib\site-packages\pandas\core\arrays\base.py", line 10, in from pandas.errors import AbstractMethodError ImportError: cannot import name 'AbstractMethodError'

====================================================================== ERROR: Failure: ImportError (cannot import name 'AbstractMethodError')

Traceback (most recent call last): File "C:\Users\user\AppData\Roaming\Python\Python36\site-packages\nose\failure.py", line 39, in runTest raise self.exc_val.with_traceback(self.tb) File "C:\Users\user\AppData\Roaming\Python\Python36\site-packages\nose\loader.py", line 418, in loadTestsFromName addr.filename, addr.module) File "C:\Users\user\AppData\Roaming\Python\Python36\site-packages\nose\importer.py", line 47, in importFromPath return self.importFromDir(dir_path, fqname) File "C:\Users\user\AppData\Roaming\Python\Python36\site-packages\nose\importer.py", line 94, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File "C:\Users\user\PyMOL\lib\imp.py", line 235, in load_module return load_source(name, filename, file) File "C:\Users\user\PyMOL\lib\imp.py", line 172, in load_source module = _load(spec) File "", line 684, in _load File "", line 665, in _load_unlocked File "", line 678, in exec_module File "", line 219, in _call_with_frames_removed File "C:\Users\user\PyMOL\lib\site-packages\mordred_base\pandas_module.py", line 2, in from pandas import Series, DataFrame File "C:\Users\user\PyMOL\lib\site-packages\pandas__init.py", line 42, in from pandas.core.api import * File "C:\Users\user\PyMOL\lib\site-packages\pandas\core\api.py", line 10, in from pandas.core.groupby import Grouper File "C:\Users\user\PyMOL\lib\site-packages\pandas\core\groupby\init.py", line 2, in from pandas.core.groupby.groupby import ( File "C:\Users\user\PyMOL\lib\site-packages\pandas\core\groupby\groupby.py", line 48, in from pandas.core.arrays import ExtensionArray, Categorical File "C:\Users\user\PyMOL\lib\site-packages\pandas\core\arrays\init__.py", line 1, in from .base import ExtensionArray # noqa File "C:\Users\user\PyMOL\lib\site-packages\pandas\core\arrays\base.py", line 10, in from pandas.errors import AbstractMethodError ImportError: cannot import name 'AbstractMethodError'


Ran 61286 tests in 60.156s

FAILED (errors=3)

(base) C:\Users\user\Vaibhav>python Python 3.6.7 |Anaconda custom (64-bit)| (default, Oct 28 2018, 19:44:12) [MSC v.1915 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.

import rdkit print("rdkit" + rdkit.version) rdkit2018.09.2

philopon commented 5 years ago

I appreciate your thoughtful report.

It seems loads pandas included in PyMOL instead of conda package. Please check your PATH environment variable?

python -c 'import sys; [print(p) for p in sys.path]'

And, please check PYTHONPATH environment variable when C:\Users\user\PyMOL\lib\site-packages is found.

python -c 'import os; print(os.environ.get("PYTHONPATH"))'

Thanks,

porteusconf commented 4 years ago

You are missing pyyaml I also had similar nose and yaml errors fixed in miniconda3 by conda install nose pyyaml