{"action":"created","issue":{"url":"https://api.github.com/repos/blaze/dask/issues/894","labels_url":"https://api.github.com/repos/blaze/dask/issues/894/labels{/name}","comments_url":"https://api.github.com/repos/blaze/dask/issues/894/comments","events_url":"https://api.github.com/repos/blaze/dask/issues/894/events","html_url":"https://github.com/blaze/dask/issues/894","id":124208365,"number":894,"title":"`dask.async.remote_exception` fails for some exception types","user":{"login":"hcarvalhoalves","id":161577,"avatar_url":"https://avatars.githubusercontent.com/u/161577?v=3","gravatar_id":"","url":"https://api.github.com/users/hcarvalhoalves","html_url":"https://github.com/hcarvalhoalves","followers_url":"https://api.github.com/users/hcarvalhoalves/followers","following_url":"https://api.github.com/users/hcarvalhoalves/following{/other_user}","gists_url":"https://api.github.com/users/hcarvalhoalves/gists{/gist_id}","starred_url":"https://api.github.com/users/hcarvalhoalves/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hcarvalhoalves/subscriptions","organizations_url":"https://api.github.com/users/hcarvalhoalves/orgs","repos_url":"https://api.github.com/users/hcarvalhoalves/repos","events_url":"https://api.github.com/users/hcarvalhoalves/events{/privacy}","received_events_url":"https://api.github.com/users/hcarvalhoalves/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-29T13:06:35Z","updated_at":"2015-12-29T15:43:35Z","closed_at":null,"body":"```\r\n---------------------------------------------------------------------------\r\nTypeError                                 Traceback (most recent call last)\r\n<ipython-input-2-197e1ec89913> in <module>()\r\n----> 1 model = build.build_all()\r\n\r\n/Users/henriquealves/Code/nu/lusa-model/src/lusa/build.py in build_all()\r\n     24     exceptions.CAPTURE_EXCEPTIONS = False\r\n     25\r\n---> 26     return build_model('score_time', mordor=mordor)\r\n\r\n/Users/henriquealves/Code/nu/lusa-model/src/lusa/build.py in build_model(score_time_col, mordor)\r\n      7\r\n      8 def build_model(score_time_col, mordor):\r\n----> 9     return dask_cached.DaskRunner().run(train.full_pipeline(mordor, score_time_col))\r\n     10\r\n     11\r\n\r\n/Users/henriquealves/Code/nu/common-models/src/common_models/dask_cached.pyc in run(self, obj, prev)\r\n     44         result = self.build(obj, prev)\r\n     45         with dask.set_options(get=self.get_function):\r\n---> 46             return result.compute(num_workers=self.num_workers)\r\n\r\n/Users/henriquealves/anaconda/envs/lusa/lib/python2.7/site-packages/dask/base.pyc in compute(self, **kwargs)\r\n     32\r\n     33     def compute(self, **kwargs):\r\n---> 34         return compute(self, **kwargs)[0]\r\n     35\r\n     36     @classmethod\r\n\r\n/Users/henriquealves/anaconda/envs/lusa/lib/python2.7/site-packages/dask/base.pyc in compute(*args, **kwargs)\r\n    100                 for opt, val in groups.items()])\r\n    101     keys = [arg._keys() for arg in args]\r\n--> 102     results = get(dsk, keys, **kwargs)\r\n    103     return tuple(a._finalize(a, r) for a, r in zip(args, results))\r\n    104\r\n\r\n/Users/henriquealves/anaconda/envs/lusa/lib/python2.7/site-packages/dask/threaded.pyc in get(dsk, result, cache, num_workers, **kwargs)\r\n     55     results = get_async(pool.apply_async, len(pool._pool), dsk, result,\r\n     56                         cache=cache, queue=queue, get_id=_thread_get_id,\r\n---> 57                         **kwargs)\r\n     58\r\n     59     return results\r\n\r\n/Users/henriquealves/anaconda/envs/lusa/lib/python2.7/site-packages/dask/async.pyc in get_async(apply_async, num_workers, dsk, result, cache, queue, get_id, raise_on_exception, rerun_exceptions_locally, callbacks, **kwargs)\r\n    481                 _execute_task(task, data)  # Re-execute locally\r\n    482             else:\r\n--> 483                 raise(remote_exception(res, tb))\r\n    484         state['cache'][key] = res\r\n    485         finish_task(dsk, key, state, results, keyorder.get)\r\n\r\n/Users/henriquealves/anaconda/envs/lusa/lib/python2.7/site-packages/dask/async.pyc in remote_exception(exc, tb)\r\n    585         typ = type(exc.__class__.__name__,\r\n    586                    (RemoteException, type(exc)),\r\n--> 587                    {'exception_type': type(exc)})\r\n    588         exceptions[type(exc)] = typ\r\n    589     return typ(exc, tb)\r\n\r\nTypeError: Cannot create a consistent method resolution\r\norder (MRO) for bases AssertionError, RemoteException\r\n```"},"comment":{"url":"https://api.github.com/repos/blaze/dask/issues/comments/167815859","html_url":"https://github.com/blaze/dask/issues/894#issuecomment-167815859","issue_url":"https://api.github.com/repos/blaze/dask/issues/894","id":167815859,"user":{"login":"mrocklin","id":306380,"avatar_url":"https://avatars.githubusercontent.com/u/306380?v=3","gravatar_id":"","url":"https://api.github.com/users/mrocklin","html_url":"https://github.com/mrocklin","followers_url":"https://api.github.com/users/mrocklin/followers","following_url":"https://api.github.com/users/mrocklin/following{/other_user}","gists_url":"https://api.github.com/users/mrocklin/gists{/gist_id}","starred_url":"https://api.github.com/users/mrocklin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrocklin/subscriptions","organizations_url":"https://api.github.com/users/mrocklin/orgs","repos_url":"https://api.github.com/users/mrocklin/repos","events_url":"https://api.github.com/users/mrocklin/events{/privacy}","received_events_url":"https://api.github.com/users/mrocklin/received_events","type":"User","site_admin":false},"created_at":"2015-12-29T15:43:35Z","updated_at":"2015-12-29T15:43:35Z","body":"Hrm, I'm not sure I understand what about the class hierarchies here is causing the error\r\n\r\n```python\r\nIn [1]: from dask.async import RemoteException\r\n\r\nIn [2]: RemoteException.mro()\r\nOut[2]: [dask.async.RemoteException, Exception, BaseException, object]\r\n\r\nIn [3]: AssertionError.mro()  # Python 2\r\nOut[3]: [AssertionError, StandardError, Exception, BaseException, object]\r\n\r\nIn [3]: AssertionError.mro()  # Python 3\r\nOut[3]: [AssertionError, Exception, BaseException, object]\r\n```\r\n\r\nI added a quick test and using `remote_exception` on `AssertionError`s seems to work fine in my simple case.  Can you post a small reproducible example?"}}