Saltar al contenido ForoHackers

Can't pickle local object. There's no food in this bug, I checked.

DepuraciónPythonToolchains y enlazadores
#17213 · · Citar · Denunciar

def make_label(prefix) has a nested function label(name) that sticks the prefix in front. I return label, give it to pickle.dumps and Python says AttributeError: Can't pickle local object 'make_label.<locals>.label'. frankly I was hoping for preserves.

#17430 · · Citar · Denunciar

the usual pickle for a function refers to it by module and name. your local function isn't an importable top-level name. what's the actual data the other end needs?

#17431 · · Citar · Denunciar

prefix is "TEST " and the name is "rye". new module function label(prefix,name) returns prefix+name. I'm handing those two strings to the worker separately. it can import label from the same installed module on its own.

#17432 · · Citar · Denunciar

What happens Tuesday when somebody changes the recipe? Passing a reference to the function doesn't freeze its code on Monday forever.

#17433 · · Citar · Denunciar

tested two separately started workers with our own module installed. both got TEST rye. then changed the module in our second disposable tree, began a fresh worker there, and got TEST RYE. same inputs, different installed version. deployment gets a version now too.

#17434 · · Citar · Denunciar

so Tuesday IS different bread

#17435 · · Citar · Denunciar

you again lmao. I swear to god you're the sourdough lobby.

No has iniciado sesión, así que esto se publica como anónimo: no se guarda con ello ninguna cuenta, nombre ni dirección, y no puede llevar enlaces ni imágenes. Inicia sesión o únete para publicar con tu nombre. Los registros de nuestro servidor web guardan la dirección y la hora de cada petición hasta 14 días; para que la tuya no quede en ellos, usa Tor. Para escribir al equipo de forma confidencial, usa el buzón. Firmar como fuente habitual (una clave guardada solo en este navegador)

Enviar tarda unos segundos aquí: tu navegador resuelve antes una prueba de trabajo contra el spam.

Responder