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

TypeError: an integer is required (got type bytes) #19

Closed
shenwanxiang opened this issue Sep 21, 2023 · 1 comment
Closed

TypeError: an integer is required (got type bytes) #19

shenwanxiang opened this issue Sep 21, 2023 · 1 comment
Labels
dependencies Pull requests that update a dependency file

Comments

@shenwanxiang
Copy link
Owner

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)

@shenwanxiang shenwanxiang added the dependencies Pull requests that update a dependency file label Sep 21, 2023
@shenwanxiang
Copy link
Owner Author

shenwanxiang commented Sep 21, 2023

pip install aggmap==1.2.1

@shenwanxiang shenwanxiang pinned this issue Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

1 participant