Skip to content
This repository was archived by the owner on Jan 12, 2026. It is now read-only.
This repository was archived by the owner on Jan 12, 2026. It is now read-only.

AttributeError: module 'msgpack' has no attribute 'dumps' #184

Description

@free-soellingeraj

ray.version = '0.8.7'

# This function is a proxy for a more interesting and computationally# intensive function.@ray.remotedefslow_function(i):
time.sleep(1)
returni# Sleep a little to improve the accuracy of the timing measurements below.# We do this because workers may still be starting up in the background.time.sleep(2.0)
start_time=time.time()
results= [slow_function.remote(i) foriinrange(4)]
end_time=time.time()
duration=end_time-start_timeprint('The results are {}. This took {} seconds. Run the next cell to see ''if the exercise was done correctly.'.format(results, duration))

yields error:

---------------------------------------------------------------------------AttributeErrorTraceback (mostrecentcalllast)
<ipython-input-12-642b7e800d47>in<module>4start_time=time.time()
5---->6results= [slow_function.remote(i) foriinrange(4)]
78end_time=time.time()
<ipython-input-12-642b7e800d47>in<listcomp>(.0)
4start_time=time.time()
5---->6results= [slow_function.remote(i) foriinrange(4)]
78end_time=time.time()
/opt/conda/lib/python3.6/site-packages/ray/remote_function.pyin_remote_proxy(*args, **kwargs)
93 @wraps(function)
94def_remote_proxy(*args, **kwargs):
--->95returnself._remote(args=args, kwargs=kwargs)
9697self.remote=_remote_proxy/opt/conda/lib/python3.6/site-packages/ray/remote_function.pyin_remote(self, args, kwargs, num_return_vals, is_direct_call, num_cpus, num_gpus, memory, object_store_memory, resources, max_retries)
216invocation=self._decorator(invocation)
217-->218returninvocation(args, kwargs)
/opt/conda/lib/python3.6/site-packages/ray/remote_function.pyininvocation(args, kwargs)
206object_refs=worker.core_worker.submit_task(
207self._language, self._function_descriptor, list_args,
-->208num_return_vals, resources, max_retries)
209210iflen(object_refs) ==1:
python/ray/_raylet.pyxinray._raylet.CoreWorker.submit_task()
python/ray/_raylet.pyxinray._raylet.CoreWorker.submit_task()
python/ray/_raylet.pyxinray._raylet.prepare_args()
/opt/conda/lib/python3.6/site-packages/ray/serialization.pyinserialize(self, value)
390metadata=ray_constants.OBJECT_METADATA_TYPE_PYTHON391-->392returnself._serialize_to_msgpack(metadata, value)
393394defregister_custom_serializer(self,
/opt/conda/lib/python3.6/site-packages/ray/serialization.pyin_serialize_to_msgpack(self, metadata, value)
358returnindex359-->360msgpack_data=MessagePackSerializer.dumps(value, _python_serializer)
361362ifpython_objects:
python/ray/includes/serialization.pxiinray._raylet.MessagePackSerializer.dumps()
AttributeError: module'msgpack'hasnoattribute'dumps'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions