Closed ivanovaos closed 1 year ago
Describe the bug Cannot import pypath submodule utils.mapping
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) ----> [6](../preprocess_inputs.py?line=5) from pypath.utils import mapping File [../anaconda3/envs/../lib/python3.9/site-packages/pypath/utils/mapping.py:70] [68](../anaconda3/envs/../lib/python3.9/site-packages/pypath/utils/mapping.py?line=67) import pypath.share.common as common [69](../anaconda3/envs/../lib/python3.9/site-packages/pypath/utils/mapping.py?line=68) import pypath.share.cache as cache_mod ---> [70](../anaconda3/envs/../lib/python3.9/site-packages/pypath/utils/mapping.py?line=69) import pypath.internals.maps as maps [71](../anaconda3/envs/../lib/python3.9/site-packages/pypath/utils/mapping.py?line=70) import pypath.resources.urls as urls [72](../anaconda3/envs/../lib/python3.9/site-packages/pypath/utils/mapping.py?line=71) import pypath.share.curl as curl File [../anaconda3/envs/../lib/python3.9/site-packages/pypath/internals/maps.py:28] [25](../anaconda3/envs/../lib/python3.9/site-packages/pypath/internals/maps.py?line=24) import os [27](../anaconda3/envs/../lib/python3.9/site-packages/pypath/internals/maps.py?line=26) import pypath.share.common as common ---> [28](../anaconda3/envs/../lib/python3.9/site-packages/pypath/internals/maps.py?line=27) import pypath.internals.input_formats as input_formats [30](../anaconda3/envs/../lib/python3.9/site-packages/pypath/internals/maps.py?line=29) __all__ = ['misc', 'uniprot', 'mirbase', 'basic'] [33](../anaconda3/envs/../lib/python3.9/site-packages/pypath/internals/maps.py?line=32) misc = { [34](../anaconda3/envs/../lib/python3.9/site-packages/pypath/internals/maps.py?line=33) ('uniprot-sec', 'uniprot-pri'): [35](../anaconda3/envs/../lib/python3.9/site-packages/pypath/internals/maps.py?line=34) input_formats.FileMapping( (...) ... --> [459](../anaconda3/envs/../lib/python3.9/site-packages/pypath/internals/input_formats.py?line=458) def _set_swissprot(self, swissprot: bool | None) -> None: [461](../anaconda3/envs/../lib/python3.9/site-packages/pypath/internals/input_formats.py?line=460) values = {'swissprot': True, 'trembl': False, 'uniprot': True} [463](../anaconda3/envs/../lib/python3.9/site-packages/pypath/internals/input_formats.py?line=462) if swissprot is None:
To Reproduce Steps to reproduce the behavior: from pypath.utils import mapping
from pypath.utils import mapping
Desktop (please complete the following information):
Is this the full traceback? Where is the exception message?
You are right, last line TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
Is your installed pypath up to date, i.e. identical to the current git head? This file already has from __future__ import annotations.
from __future__ import annotations
Describe the bug Cannot import pypath submodule utils.mapping
To Reproduce Steps to reproduce the behavior:
from pypath.utils import mapping
Desktop (please complete the following information):