lisc-tools / lisc

Literature Scanner: Automated collection & analyses of the scientific literature.
https://lisc-tools.github.io/
Apache License 2.0
91 stars 11 forks source link

Error on tutorial n°2 #24

Closed linuxscout closed 4 years ago

linuxscout commented 5 years ago

I used python3 plot_02-CountsAnalysis.py I get the following error

For  'frontal lobe'    the highest association is  'audition'        with         377
For  'temporal lobe'   the highest association is  'audition'        with        1299
For  'parietal lobe'   the highest association is  'audition'        with         231
For  'occipital lobe'  the highest association is  'vision'          with         236
For  'vision'          the highest association is  'occipital lobe'  with         236
For  'audition'        the highest association is  'temporal lobe'   with        1299
For  'somatosensory'   the highest association is  'parietal lobe'   with         187
For  'olfaction'       the highest association is  'temporal lobe'   with          71
For  'gustation'       the highest association is  'temporal lobe'   with          44
For  'proprioception'  the highest association is  'parietal lobe'   with           9
For  'nociception'     the highest association is  'temporal lobe'   with         198
[[1.05994414e-02 2.69999284e-02 9.59679152e-03 3.58089236e-03
  1.14588555e-03 2.86471389e-04 1.14588555e-02]
 [6.88251619e-03 4.80666050e-02 6.80851064e-03 2.62719704e-03
  1.62812211e-03 7.40055504e-05 7.32654949e-03]
 [1.75801448e-02 4.77766287e-02 3.86763185e-02 1.65460186e-03
  1.24095140e-03 1.86142709e-03 2.33712513e-02]
 [6.44984969e-02 2.32303908e-02 9.56545504e-03 1.36649358e-03
  0.00000000e+00 0.00000000e+00 1.72178191e-02]]
[[1.16386971e-03 3.37408488e-03 3.15234779e-03 1.86908901e-03
  3.77287304e-04 2.14454214e-04 2.63519801e-04]
 [1.32680867e-03 1.04864621e-02 3.31412104e-03 1.78427825e-03
  7.93622164e-04 6.30596544e-05 3.19257517e-04]
 [7.19747326e-04 2.24813142e-03 5.61106610e-03 4.52872913e-04
  1.80234305e-04 9.45477466e-04 1.88936671e-04]
 [2.02106705e-03 8.35610782e-04 1.08349070e-03 3.03177298e-04
  0.00000000e+00 0.00000000e+00 1.05535063e-04]]
Traceback (most recent call last):
  File "plot_02-CountsAnalysis.py", line 129, in <module>
    plot_matrix(counts.score, counts.terms['B'].labels, counts.terms['A'].labels)
  File "/usr/local/lib/python3.5/dist-packages/lisc/plts/utils.py", line 93, in decorated
    func(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/lisc/plts/counts.py", line 45, in plot_matrix
    cmap = get_cmap(cmap)
  File "/usr/local/lib/python3.5/dist-packages/lisc/plts/utils.py", line 49, in get_cmap
    cmap = sns.cubehelix_palette(as_cmap=True)
AttributeError: 'bool' object has no attribute 'cubehelix_palette'
linuxscout commented 5 years ago

I installed the seaborn lib, The error disappears, but I have new one

Traceback (most recent call last):
  File "plot_02-CountsAnalysis.py", line 21, in <module>
    from lisc.plts.counts import *
  File "/usr/local/lib/python3.5/dist-packages/lisc/plts/counts.py", line 9, in <module>
    from lisc.plts.utils import check_args, check_ax, savefig, get_cmap
  File "/usr/local/lib/python3.5/dist-packages/lisc/plts/utils.py", line 10, in <module>
    sns = safe_import('seaborn')
  File "/usr/local/lib/python3.5/dist-packages/lisc/core/modutils.py", line 29, in safe_import
    mod = import_module(*args)
  File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/usr/lib/python3/dist-packages/seaborn/__init__.py", line 1, in <module>
    from .rcmod import *
  File "/usr/lib/python3/dist-packages/seaborn/rcmod.py", line 5, in <module>
    from . import palettes
  File "/usr/lib/python3/dist-packages/seaborn/palettes.py", line 14, in <module>
    from .utils import desaturate, set_hls_values
  File "/usr/lib/python3/dist-packages/seaborn/utils.py", line 9, in <module>
    import pandas as pd
  File "/usr/local/lib/python3.5/dist-packages/pandas/__init__.py", line 55, in <module>
    from pandas.core.api import (
  File "/usr/local/lib/python3.5/dist-packages/pandas/core/api.py", line 5, in <module>
    from pandas.core.arrays.integer import (
  File "/usr/local/lib/python3.5/dist-packages/pandas/core/arrays/__init__.py", line 1, in <module>
    from .array_ import array  # noqa: F401
  File "/usr/local/lib/python3.5/dist-packages/pandas/core/arrays/array_.py", line 7, in <module>
    from pandas.core.dtypes.common import (
  File "/usr/local/lib/python3.5/dist-packages/pandas/core/dtypes/common.py", line 11, in <module>
    from pandas.core.dtypes.dtypes import (
  File "/usr/local/lib/python3.5/dist-packages/pandas/core/dtypes/dtypes.py", line 53, in <module>
    class Registry:
  File "/usr/local/lib/python3.5/dist-packages/pandas/core/dtypes/dtypes.py", line 84, in Registry
    self, dtype: Union[Type[ExtensionDtype], str]
  File "/usr/lib/python3.5/typing.py", line 552, in __getitem__
    dict(self.__dict__), parameters, _root=True)
  File "/usr/lib/python3.5/typing.py", line 512, in __new__
    for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
  File "/usr/lib/python3.5/typing.py", line 512, in <genexpr>
    for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
  File "/usr/lib/python3.5/typing.py", line 1077, in __subclasscheck__
    if super().__subclasscheck__(cls):
  File "/usr/lib/python3.5/abc.py", line 225, in __subclasscheck__
    for scls in cls.__subclasses__():
TypeError: descriptor '__subclasses__' of 'type' object needs an argument
TomDonoghue commented 5 years ago

Hmm. I'm not totally sure what's going on here. Something about how the module handles optional dependencies isn't working out, but I'm unclear where the second error comes from. I'll look into this when I get a chance.

linuxscout commented 5 years ago

The first one was from seaborn library.