shenwanxiang/bidd-aggmap

TypeError: an integer is required (got type bytes)

Closed this issue · 1 comments

TypeError Traceback (most recent call last)
Cell In[1], line 2
1 import pandas as pd
----> 2 from sklearn.datasets import load_breast_cancer
3 from aggmap import AggMap, AggMapNet
5 # Data loading

File ~/micromamba/envs/aggmap/lib/python3.8/site-packages/sklearn/init.py:82
80 from . import _distributor_init # noqa: F401
81 from . import __check_build # noqa: F401
---> 82 from .base import clone
83 from .utils._show_versions import show_versions
85 all = ['calibration', 'cluster', 'covariance', 'cross_decomposition',
86 'datasets', 'decomposition', 'dummy', 'ensemble', 'exceptions',
87 'experimental', 'externals', 'feature_extraction',
(...)
96 'clone', 'get_config', 'set_config', 'config_context',
97 'show_versions']

File ~/micromamba/envs/aggmap/lib/python3.8/site-packages/sklearn/base.py:20
17 import numpy as np
19 from . import version
---> 20 from .utils import _IS_32BIT
22 _DEFAULT_TAGS = {
23 'non_deterministic': False,
24 'requires_positive_X': False,
(...)
35 'binary_only': False,
36 'requires_fit': True}
39 def clone(estimator, safe=True):

File ~/micromamba/envs/aggmap/lib/python3.8/site-packages/sklearn/utils/init.py:24
22 from .murmurhash import murmurhash3_32
23 from .class_weight import compute_class_weight, compute_sample_weight
---> 24 from . import _joblib
25 from ..exceptions import DataConversionWarning
26 from .deprecation import deprecated

File ~/micromamba/envs/aggmap/lib/python3.8/site-packages/sklearn/utils/_joblib.py:7
4 _warnings.simplefilter("ignore")
5 # joblib imports may raise DeprecationWarning on certain Python
6 # versions
----> 7 import joblib
8 from joblib import logger
9 from joblib import dump, load

File ~/micromamba/envs/aggmap/lib/python3.8/site-packages/joblib/init.py:119
117 from .numpy_pickle import load
118 from .compressor import register_compressor
--> 119 from .parallel import Parallel
120 from .parallel import delayed
121 from .parallel import cpu_count

File ~/micromamba/envs/aggmap/lib/python3.8/site-packages/joblib/parallel.py:28
26 from .my_exceptions import TransportableException
27 from .disk import memstr_to_bytes
---> 28 from ._parallel_backends import (FallbackToBackend, MultiprocessingBackend,
29 ThreadingBackend, SequentialBackend,
30 LokyBackend)
31 from ._compat import _basestring
32 from .externals.cloudpickle import dumps, loads

File ~/micromamba/envs/aggmap/lib/python3.8/site-packages/joblib/_parallel_backends.py:22
20 from .pool import MemmappingPool
21 from multiprocessing.pool import ThreadPool
---> 22 from .executor import get_memmapping_executor
24 # Compat between concurrent.futures and multiprocessing TimeoutError
25 from multiprocessing import TimeoutError

File ~/micromamba/envs/aggmap/lib/python3.8/site-packages/joblib/executor.py:14
12 from .disk import delete_folder
13 from ._memmapping_reducer import get_memmapping_reducers
---> 14 from .externals.loky.reusable_executor import get_reusable_executor
17 _backend_args = None
20 def get_memmapping_executor(n_jobs, timeout=300, initializer=None, initargs=(),
21 **backend_args):

File ~/micromamba/envs/aggmap/lib/python3.8/site-packages/joblib/externals/loky/init.py:12
9 from ._base import ALL_COMPLETED, FIRST_COMPLETED, FIRST_EXCEPTION
11 from .backend.context import cpu_count
---> 12 from .backend.reduction import set_loky_pickler
13 from .reusable_executor import get_reusable_executor
14 from .cloudpickle_wrapper import wrap_non_picklable_objects

File ~/micromamba/envs/aggmap/lib/python3.8/site-packages/joblib/externals/loky/backend/reduction.py:125
123 # global variable to change the pickler behavior
124 try:
--> 125 from joblib.externals import cloudpickle # noqa: F401
126 DEFAULT_ENV = "cloudpickle"
127 except ImportError:
128 # If cloudpickle is not present, fallback to pickle

File ~/micromamba/envs/aggmap/lib/python3.8/site-packages/joblib/externals/cloudpickle/init.py:3
1 from future import absolute_import
----> 3 from .cloudpickle import *
5 version = '0.8.0'

File ~/micromamba/envs/aggmap/lib/python3.8/site-packages/joblib/externals/cloudpickle/cloudpickle.py:152
132 else:
133 return types.CodeType(
134 co.co_argcount,
135 co.co_kwonlyargcount,
(...)
148 (),
149 )
--> 152 _cell_set_template_code = _make_cell_set_template_code()
155 def cell_set(cell, value):
156 """Set the value of a closure cell.
157 """

File ~/micromamba/envs/aggmap/lib/python3.8/site-packages/joblib/externals/cloudpickle/cloudpickle.py:133, in _make_cell_set_template_code()
116 return types.CodeType(
117 co.co_argcount,
118 co.co_nlocals,
(...)
130 (),
131 )
132 else:
--> 133 return types.CodeType(
134 co.co_argcount,
135 co.co_kwonlyargcount,
136 co.co_nlocals,
137 co.co_stacksize,
138 co.co_flags,
139 co.co_code,
140 co.co_consts,
141 co.co_names,
142 co.co_varnames,
143 co.co_filename,
144 co.co_name,
145 co.co_firstlineno,
146 co.co_lnotab,
147 co.co_cellvars, # this is the trickery
148 (),
149 )

TypeError: an integer is required (got type bytes)

pip install aggmap==1.2.1