Skip to content

Pickling error with 0.5.1. #131

Closed
Closed

Description

@robertnishihara

The following works in 0.4.1 but breaks with 0.5.1. I've tried this with Python 3.6. I've also tried using protocols 0, 1, 2, 3, 4.

import cloudpickle

class Foo(object):
    pass

def f():
    Foo

cloudpickle.dumps(f)

Then in a separate Python interpreter:

>>> import cloudpickle
>>> cloudpickle.loads(...the string dumped above...)
AttributeError: Can't get attribute 'Foo' on <module '__main__'>

Activity

  1. iaroslav-ai commented on Nov 10, 2017

    @iaroslav-ai

    Just encountered same bug. Will use 0.4.1 version of cloudpickle for now.

  2. ogrisel commented on Nov 13, 2017

    @ogrisel
    Contributor

    Sorry, this is extremely embarrassing. I wonder why this has not been caught by our test suite. I will investigate.

  3. ogrisel commented on Nov 13, 2017

    @ogrisel
    Contributor

    The problem is also there in 0.4.2 so was probably caused by the change to _fill_function arguments done in: #130.

  4. ogrisel commented on Nov 16, 2017

    @ogrisel
    Contributor

    Fixed in master.

  5. added this to the 0.5.2 milestone on Nov 16, 2017
  6. ogrisel commented on Nov 21, 2017

    @ogrisel
    Contributor

    FYI cloudpickle 0.5.2 was released.

  7. added a commit that references this issue on Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions