Alfie

    Alfie

    1 year ago
    hi Team, I’m migrating Prefect core from 0.12.6 to 0.13.10, and get the error when i try to register my flow. Please help, thanks.
    File ".../.pyenv/versions/alert/lib/python3.8/site-packages/prefect/core/flow.py", line 1608, in register
        registered_flow = client.register(
      File ".../.pyenv/versions/alert/lib/python3.8/site-packages/prefect/client/client.py", line 734, in register
        serialized_flow = flow.serialize(build=build)  # type: Any
      File ".../.pyenv/versions/alert/lib/python3.8/site-packages/prefect/core/flow.py", line 1451, in serialize
        self.storage.add_flow(self)
      File ".../.pyenv/versions/alert/lib/python3.8/site-packages/prefect/environments/storage/local.py", line 140, in add_flow
        flow_location = flow.save(flow_location)
      File ".../.pyenv/versions/alert/lib/python3.8/site-packages/prefect/core/flow.py", line 1520, in save
        cloudpickle.dump(self, f)
      File ".../.pyenv/versions/alert/lib/python3.8/site-packages/cloudpickle/cloudpickle_fast.py", line 55, in dump
        CloudPickler(
      File ".../.pyenv/versions/alert/lib/python3.8/site-packages/cloudpickle/cloudpickle_fast.py", line 563, in dump
        return Pickler.dump(self, obj)
    TypeError: 'NoneType' object is not callable
    james.lamb

    james.lamb

    1 year ago
    Every time I've seen that error, it's because of mismatched cloudpickle version between the flow and the environment where it's being loaded 😬
    Alfie

    Alfie

    1 year ago
    thanks @james.lamb, but this happens when i create the flow, i use local storage, seems the error happens when prefect writes the flow in to a local directory
    it’s solved, the reason is I have a class has implementation cannot be handled by pickle