Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when saving session with custom helper function #790

Closed
astrofrog opened this issue Nov 17, 2015 · 1 comment
Closed

Error when saving session with custom helper function #790

astrofrog opened this issue Nov 17, 2015 · 1 comment

Comments

@astrofrog
Copy link
Member

I tried saving a session that makes use of a custom @link_helper function from config.py and got the following error:

Traceback (most recent call last):
  File "/Users/tom/miniconda3/envs/production/lib/python3.4/site-packages/glueviz-0.6.0.dev2176-py3.4.egg/glue/core/application_base.py", line 25, in wrapper
    return func(*args, **kwargs)
  File "/Users/tom/miniconda3/envs/production/lib/python3.4/site-packages/glueviz-0.6.0.dev2176-py3.4.egg/glue/core/application_base.py", line 94, in save_session
    state = gs.dumps(indent=2)
  File "/Users/tom/miniconda3/envs/production/lib/python3.4/site-packages/glueviz-0.6.0.dev2176-py3.4.egg/glue/core/state.py", line 338, in dumps
    result = self.dumpo()
  File "/Users/tom/miniconda3/envs/production/lib/python3.4/site-packages/glueviz-0.6.0.dev2176-py3.4.egg/glue/core/state.py", line 320, in dumpo
    return self.do_all()
  File "/Users/tom/miniconda3/envs/production/lib/python3.4/site-packages/glueviz-0.6.0.dev2176-py3.4.egg/glue/core/state.py", line 254, in do_all
    result = [(oid, self.do(obj)) for oid, obj in list(self._objs.items())]
  File "/Users/tom/miniconda3/envs/production/lib/python3.4/site-packages/glueviz-0.6.0.dev2176-py3.4.egg/glue/core/state.py", line 254, in <listcomp>
    result = [(oid, self.do(obj)) for oid, obj in list(self._objs.items())]
  File "/Users/tom/miniconda3/envs/production/lib/python3.4/site-packages/glueviz-0.6.0.dev2176-py3.4.egg/glue/core/state.py", line 276, in do
    result = fun(obj, self)
  File "/Users/tom/miniconda3/envs/production/lib/python3.4/site-packages/glueviz-0.6.0.dev2176-py3.4.egg/glue/core/state.py", line 715, in _save_component_link
    using = context.do(link.get_using())
  File "/Users/tom/miniconda3/envs/production/lib/python3.4/site-packages/glueviz-0.6.0.dev2176-py3.4.egg/glue/core/state.py", line 276, in do
    result = fun(obj, self)
  File "/Users/tom/miniconda3/envs/production/lib/python3.4/site-packages/glueviz-0.6.0.dev2176-py3.4.egg/glue/core/link_helpers.py", line 58, in __gluestate__
    return dict(func=context.do(self.func), index=self.index)
  File "/Users/tom/miniconda3/envs/production/lib/python3.4/site-packages/glueviz-0.6.0.dev2176-py3.4.egg/glue/core/state.py", line 274, in do
    fun, version = self._dispatch(obj)
  File "/Users/tom/miniconda3/envs/production/lib/python3.4/site-packages/glueviz-0.6.0.dev2176-py3.4.egg/glue/core/state.py", line 301, in _dispatch
    " %r of type %s" % (obj, type(obj)))
glue.core.state.GlueSerializeError: Don't know how to serialize <bound method GalactocentricToGalactic.backward of [l <- GalactocentricToGalactic.forward_1(x, y, z), b <- GalactocentricToGalactic.forward_2(x, y, z), d <- GalactocentricToGalactic.forward_3(x, y, z), x <- GalactocentricToGalactic.backward_1(l, b, d), y <- GalactocentricToGalactic.backward_2(l, b, d), z <- GalactocentricToGalactic.backward_3(l, b, d)]> of type <class 'method'>
@astrofrog
Copy link
Member Author

Fixed by #1139

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant