{"record":{"id":"29bbdc871851d789","repo":"apache/beam","slug":"unknown-pickler-library-selected-library","errorCode":null,"errorMessage":"Unknown pickler library: {selected_library}","messagePattern":"Unknown pickler library: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/internal/pickler.py","lineNumber":131,"sourceCode":"        \"e.g. apache-beam[dill].\")\n  if selected_library == USE_DILL_UNSAFE and not dill_pickler:\n    raise ImportError(\n        \"Pipeline option pickle_library=dill_unsafe is set, but dill is not \"\n        \"installed. Install dill in job submission and runtime environments.\")\n\n  dill_is_requested = (\n      selected_library == USE_DILL or selected_library == USE_DILL_UNSAFE)\n\n  # If switching to or from dill, update the pickler hook overrides.\n  if is_currently_dill() != dill_is_requested:\n    dill_pickler.override_pickler_hooks(selected_library == USE_DILL)\n\n  if dill_is_requested:\n    desired_pickle_lib = dill_pickler\n  elif selected_library == USE_CLOUDPICKLE:\n    desired_pickle_lib = cloudpickle_pickler\n  else:\n    raise ValueError(f'Unknown pickler library: {selected_library}')\n","sourceCodeStart":113,"sourceCodeEnd":132,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/internal/pickler.py#L113-L132","documentation":"apache_beam.internal.pickler.set_library validates the requested pickle backend name. After resolving 'default' and checking dill/cloudpickle availability, any unrecognized library name falls through to a ValueError listing the invalid name. The accepted values are default, dill, dill_unsafe, and cloudpickle.","triggerScenarios":"Passing pickle_library=<anything other than default|dill|dill_unsafe|cloudpickle> as a pipeline option, e.g. a typo like pickle_library=pickel, cPickle, or 'pickle'.","commonSituations":"Typoed pipeline option values; copying config from old Beam examples that used a renamed option value; assuming stdlib 'pickle' is a valid explicit choice (it is only reachable via 'default').","solutions":["Set --pickle_library to one of: default, dill, dill_unsafe, cloudpickle","Remove the pickle_library option entirely to use the default backend","If you meant stdlib pickle, use pickle_library=default","Check apache_beam.internal.pickler.USE_* constants for the exact accepted strings in your Beam version"],"exampleFix":"// before\n--pickle_library=pickle   # ValueError: Unknown pickler library: pickle\n// after\n--pickle_library=default","handlingStrategy":"validation","validationCode":"ALLOWED = {'default', 'dill', 'dill_unsafe', 'cloudpickle'}\nassert pickle_library in ALLOWED, f'invalid pickle_library: {pickle_library}'","typeGuard":null,"tryCatchPattern":"try:\n    pickler.set_library(lib)\nexcept ValueError as e:\n    logging.error('%s; falling back to default', e)\n    pickler.set_library('default')","preventionTips":["Validate pipeline option values against the allowed set before submission","Copy exact option strings from Beam docs rather than retyping","Pin Beam version and check its pickler constants when upgrading"],"tags":["python","pickle","invalid-argument","pipeline-options"],"backgroundTag":"invalid-enum-value","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}