Traceback from cell
TypeError Traceback (most recent call last)
Cell In[18], line 1
----> 1 import labelbox as lb
File ~/git-ps/projects/python/labelbox-export/venv/lib/python3.9/site-packages/labelbox/init.py:4
1 name = “labelbox”
2 version = “3.51.0”
----> 4 from labelbox.client import Client
5 from labelbox.schema.project import Project
6 from labelbox.schema.model import Model
File ~/git-ps/projects/python/labelbox-export/venv/lib/python3.9/site-packages/labelbox/client.py:27
25 from labelbox.schema.dataset import Dataset
26 from labelbox.schema.enums import CollectionJobStatus
—> 27 from labelbox.schema.iam_integration import IAMIntegration
28 from labelbox.schema import role
29 from labelbox.schema.labeling_frontend import LabelingFrontend
File ~/git-ps/projects/python/labelbox-export/venv/lib/python3.9/site-packages/labelbox/schema/init.py:14
12 import labelbox.schema.ontology
13 import labelbox.schema.organization
—> 14 import labelbox.schema.project
15 import labelbox.schema.review
16 import labelbox.schema.role
File ~/git-ps/projects/python/labelbox-export/venv/lib/python3.9/site-packages/labelbox/schema/project.py:43
40 MonkeyPatch.patch_fromisoformat()
42 try:
—> 43 from labelbox.data.serialization import LBV1Converter
44 except ImportError:
45 pass
File ~/git-ps/projects/python/labelbox-export/venv/lib/python3.9/site-packages/labelbox/data/serialization/init.py:1
----> 1 from .labelbox_v1 import LBV1Converter
2 from .ndjson import NDJsonConverter
3 from .coco import COCOConverter
File ~/git-ps/projects/python/labelbox-export/venv/lib/python3.9/site-packages/labelbox/data/serialization/labelbox_v1/init.py:1
----> 1 from .converter import LBV1Converter
File ~/git-ps/projects/python/labelbox-export/venv/lib/python3.9/site-packages/labelbox/data/serialization/labelbox_v1/converter.py:1
----> 1 from labelbox.data.serialization.labelbox_v1.objects import LBV1Mask
2 from typing import Any, Dict, Generator, Iterable, Union
3 import logging
File ~/git-ps/projects/python/labelbox-export/venv/lib/python3.9/site-packages/labelbox/data/serialization/labelbox_v1/objects.py:10
7 from pydantic import BaseModel, validator, Field
8 import numpy as np
—> 10 from .classification import LBV1Checklist, LBV1Classifications, LBV1Radio, LBV1Text, LBV1Dropdown
11 from .feature import LBV1Feature
12 from …annotation_types.annotation import (ClassificationAnnotation,
13 ObjectAnnotation)
File ~/git-ps/projects/python/labelbox-export/venv/lib/python3.9/site-packages/labelbox/data/serialization/labelbox_v1/classification.py:6
3 from pydantic.main import BaseModel
5 from .feature import LBV1Feature
----> 6 from …annotation_types.annotation import ClassificationAnnotation
7 from …annotation_types.classification import Checklist, ClassificationAnswer, Radio, Text, Dropdown
8 from …annotation_types.types import Cuid
File ~/git-ps/projects/python/labelbox-export/venv/lib/python3.9/site-packages/labelbox/data/annotation_types/init.py:1
----> 1 from .geometry import Line
2 from .geometry import Point
3 from .geometry import Mask
File ~/git-ps/projects/python/labelbox-export/venv/lib/python3.9/site-packages/labelbox/data/annotation_types/geometry/init.py:3
1 from .line import Line
2 from .point import Point
----> 3 from .mask import Mask
4 from .polygon import Polygon
5 from .rectangle import Rectangle
File ~/git-ps/projects/python/labelbox-export/venv/lib/python3.9/site-packages/labelbox/data/annotation_types/geometry/mask.py:9
5 import cv2
7 from shapely.geometry import MultiPolygon, Polygon
----> 9 from …data import MaskData
10 from .geometry import Geometry
13 class Mask(Geometry):
File ~/git-ps/projects/python/labelbox-export/venv/lib/python3.9/site-packages/labelbox/data/annotation_types/data/init.py:6
4 from .document import DocumentData
5 from .html import HTMLData
----> 6 from .raster import ImageData
7 from .raster import MaskData
8 from .text import TextData
File ~/git-ps/projects/python/labelbox-export/venv/lib/python3.9/site-packages/labelbox/data/annotation_types/data/raster.py:196
192 # Required for discriminating between data types
193 extra = ‘forbid’
→ 196 class MaskData(RasterData):
197 “”“Used to represent a segmentation Mask
198
199 All segments within a mask must be mutually exclusive. At a
(…)
214 arr: Optional[TypedArray[Literal[‘uint8’]]] = None
215 “””
218 class ImageData(RasterData, BaseData):
File ~/git-ps/projects/python/labelbox-export/venv/lib/python3.9/site-packages/pydantic/main.py:138, in pydantic.main.ModelMetaclass.new()
File ~/git-ps/projects/python/labelbox-export/venv/lib/python3.9/site-packages/pydantic/utils.py:693, in pydantic.utils.smart_deepcopy()
File /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/copy.py:146, in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
→ 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
File /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/copy.py:230, in _deepcopy_dict(x, memo, deepcopy)
228 memo[id(x)] = y
229 for key, value in x.items():
→ 230 y[deepcopy(key, memo)] = deepcopy(value, memo)
231 return y
File /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/copy.py:172, in deepcopy(x, memo, _nil)
170 y = x
171 else:
→ 172 y = _reconstruct(x, memo, *rv)
174 # If is its own copy, don’t memoize.
175 if y is not x:
File /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/copy.py:270, in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
268 if state is not None:
269 if deep:
→ 270 state = deepcopy(state, memo)
271 if hasattr(y, ‘setstate’):
272 y.setstate(state)
File /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/copy.py:146, in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
→ 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
File /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/copy.py:210, in _deepcopy_tuple(x, memo, deepcopy)
209 def _deepcopy_tuple(x, memo, deepcopy=deepcopy):
→ 210 y = [deepcopy(a, memo) for a in x]
211 # We’re not going to put the tuple in the memo, but it’s still important we
212 # check for it, in case the tuple contains recursive mutable structures.
213 try:
File /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/copy.py:210, in (.0)
209 def _deepcopy_tuple(x, memo, deepcopy=deepcopy):
→ 210 y = [deepcopy(a, memo) for a in x]
211 # We’re not going to put the tuple in the memo, but it’s still important we
212 # check for it, in case the tuple contains recursive mutable structures.
213 try:
File /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/copy.py:146, in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
→ 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
File /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/copy.py:230, in _deepcopy_dict(x, memo, deepcopy)
228 memo[id(x)] = y
229 for key, value in x.items():
→ 230 y[deepcopy(key, memo)] = deepcopy(value, memo)
231 return y
File /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/copy.py:153, in deepcopy(x, memo, _nil)
151 copier = getattr(x, “deepcopy”, None)
152 if copier is not None:
→ 153 y = copier(memo)
154 else:
155 reductor = dispatch_table.get(cls)
TypeError: descriptor ‘deepcopy’ for ‘numpy.ndarray’ objects doesn’t apply to a ‘dict’ object