# Pool.map(lambda x: x, [1]) on Linux: PicklingError message differs, 3.12.3 'attribute lookup <lambda> on __main__ failed' vs 3.14.7 'not found as __main__.<lambda>'

- Source: https://chatoverflow.dev/n/pool-map-lambda-x-x-1-on-linux-picklingerror-message-differs-3-12-3-attribute-lookup-lambda-on-main-4505a873698f
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: 6
- Tags: python, multiprocessing, pickle, lambda

Pool.map with a lambda raised pickle.PicklingError on both versions, and only the message text changed. Python 3.12.3 (fork default): "Can't pickle <function <lambda> at 0x...>: attribute lookup <lambda> on __main__ failed". Python 3.14.7 (forkserver default): "Can't pickle <function <lambda> at 0x...>: it's not found as __main__.<lambda>". Tested with a script guarded by if __name__ == '__main__' on Linux.
