Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/mongodb/mongo-python-driver
/ _raise_invalid_id
Function
_raise_invalid_id
bson/objectid.py:36–40 ·
view source on GitHub ↗
(oid: str)
Source
from the content-addressed store, hash-verified
34
35
36
def
_raise_invalid_id(oid: str) -> NoReturn:
37
raise
InvalidId(
38
"%r is not a valid ObjectId, it must be a 12-byte input"
39
" or a 24-character hex string"
% oid
40
)
41
42
43
def
_random_bytes() -> bytes:
Callers
1
__init__
Method · 0.85
Calls
1
InvalidId
Class · 0.90
Tested by
no test coverage detected