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

Recent install on Mac unusable due to Python ImportError #1

Closed
jan-grimo opened this issue Mar 10, 2016 · 1 comment
Closed

Recent install on Mac unusable due to Python ImportError #1

jan-grimo opened this issue Mar 10, 2016 · 1 comment

Comments

@jan-grimo
Copy link

A recent install (without conda) on Mac OSX 10.11.2 was unusable due to

$ python manage.py migrate
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
    utility.execute()
  File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 327, in execute
    django.setup()
  File "/Library/Python/2.7/site-packages/django/__init__.py", line 18, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/Library/Python/2.7/site-packages/django/apps/registry.py", line 108, in populate
    app_config.import_models(all_models)
  File "/Library/Python/2.7/site-packages/django/apps/config.py", line 202, in import_models
    self.models_module = import_module(models_module_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/Library/Python/2.7/site-packages/django_rdkit-0.0.4-py2.7.egg/django_rdkit/models/__init__.py", line 8, in <module>
    from django_rdkit.models.fields import *
  File "/Library/Python/2.7/site-packages/django_rdkit-0.0.4-py2.7.egg/django_rdkit/models/fields.py", line 10, in <module>
    from rdkit.DataStructs import ExplicitBitVect, SparseIntVect
ImportError: cannot import name SparseIntVect

In django_rdkit/models/fields.py, SparseIntVect is unused, so removing the import and then reinstalling w/ $ python setup.py install fixed it. SparseBitVect exists though, maybe that was the intention?

@rvianello
Copy link
Contributor

Thanks a lot for the bug report @jargonzombies

The import statement referencing SparseIntVect must be a leftover from an early attempt at supporting direct I/O for the SfpField. As you noted it's unused and I will remove it from the code.

(a SparseIntVect module was indeed available from rdkit.DataStructs, but it had been obsoleted by the C++ implementation and it was therefore removed, resulting in this regression).

rvianello added a commit that referenced this issue Mar 12, 2016
rvianello pushed a commit to rvianello/django-rdkit that referenced this issue Oct 30, 2018
…-prep-value

minor additions to the molfield prep value changes
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

2 participants