fail to import mass module from pyteomics

6 views
Skip to first unread message

assaf...@gmail.com

unread,
Dec 15, 2019, 7:05:11 AM12/15/19
to Pyteomics
Hi
I installed pyteomics with conda and when I try to import mass module into my code I get the following error: 
Traceback (most recent call last):

  File "<ipython-input-128-e26ae995bc0e>", line 1, in <module>
    from pyteomics import mass

  File "C:\Users\assafk\AppData\Local\conda\conda\envs\merbl36\lib\site-packages\pyteomics\mass\__init__.py", line 1, in <module>
    from .mass import *

  File "C:\Users\assafk\AppData\Local\conda\conda\envs\merbl36\lib\site-packages\pyteomics\mass\mass.py", line 389, in <module>
    'A':   Composition({'H': 5, 'C': 3, 'O': 1, 'N': 1}),

  File "C:\Users\assafk\AppData\Local\conda\conda\envs\merbl36\lib\site-packages\pyteomics\mass\mass.py", line 299, in __init__
    self._from_composition(args[0])

  File "C:\Users\assafk\AppData\Local\conda\conda\envs\merbl36\lib\site-packages\pyteomics\mass\mass.py", line 218, in _from_composition
    self[_make_isotope_string(element_name, isotope_num)] = num_atoms

  File "C:\Users\assafk\AppData\Local\conda\conda\envs\merbl36\lib\site-packages\pyteomics\auxiliary\structures.py", line 173, in __setitem__
    super(BasicComposition, self).__setitem__(key, value)

TypeError: super(type, obj): obj must be an instance or subtype of type


python version 3.6

can you help?
thanks
Assaf

Joshua Klein

unread,
Dec 15, 2019, 10:27:00 AM12/15/19
to pyteomics

Do you get this problem when you start a new Python interpreter session and directly import pyteomics.mass?

This problem can occur when you use importlib.reload on a module defining a base class of another class, which was either not defined in the reloaded module, or was imported by another module that was not reloaded.


--
You received this message because you are subscribed to the Google Groups "Pyteomics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyteomics+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyteomics/5d961fbb-393c-425f-a677-11f808d80526%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages