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 on saving notebook containing Holoviews Panel objects #560

Open
jj-github-jj opened this issue Oct 25, 2022 · 4 comments
Open

Error on saving notebook containing Holoviews Panel objects #560

jj-github-jj opened this issue Oct 25, 2022 · 4 comments

Comments

@jj-github-jj
Copy link

jj-github-jj commented Oct 25, 2022

Get the following error on saving notebook session if notebook has aholoview panel object

File c:\Users\test\AppData\Local\Programs\Python\Python39\lib\site-packages\dill\_dill.py:503, in dump_session(filename, main, byref, **kwds)
    501     pickler._first_pass = True
    502     pickler._main_modified = main is not pickler._original_main
--> 503     pickler.dump(main)
    504 finally:
    505     if f is not filename:  # If newly opened file

File c:\Users\test\AppData\Local\Programs\Python\Python39\lib\site-packages\dill\_dill.py:620, in Pickler.dump(self, obj)
    618     raise PicklingError(msg)
    619 else:
--> 620     StockPickler.dump(self, obj)
    621 return

File c:\Users\test\AppData\Local\Programs\Python\Python39\lib\pickle.py:487, in _Pickler.dump(self, obj)
    485 if self.proto >= 4:
    486     self.framer.start_framing()
--> 487 self.save(obj)
    488 self.write(STOP)
    489 self.framer.end_framing()
...
    580     reduce = getattr(obj, "__reduce__", None)

File stringsource:2, in zmq.backend.cython.context.Context.__reduce_cython__()

TypeError: no default __reduce__ due to non-trivial __cinit__
@mmckerns
Copy link
Member

I'm going to guess that a holoview panel object is not serializable, so you will have to remove it (either manually, or with something like #475).

@jj-github-jj
Copy link
Author

Thank you for the quick response.

@jj-github-jj
Copy link
Author

Is it possible to skip Un serializable objects and just not error out and save what can be saved for the session?

@mmckerns
Copy link
Member

Yes... that's why I pointed you to the discussion in #475. Currently, you'll need to write a small filter yourself, as in #66. You can close this issue if you feel it's significantly been addressed.

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

No branches or pull requests

2 participants