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

Use dump_module() in jupyter notebook with remote kernel #636

Open
nadavv169 opened this issue Dec 20, 2023 · 3 comments
Open

Use dump_module() in jupyter notebook with remote kernel #636

nadavv169 opened this issue Dec 20, 2023 · 3 comments

Comments

@nadavv169
Copy link

I have a jupyter notebook with Jupyter Enterprise Gateway architecture and i am trying to use the dump_module() function in my notebook but i'm getting the error:

TypeError: <IPython.core.interactiveshell.DummyMod object at .... is not a module

I tried to run the same function in jupyter notebook without remote kernel and it worked, so i assume the issue is with the remote-kernel.

any ideas to solution?

relevant packages versions:
dill==0.3.7
ipython==7.34.0
ipykernel==5.5.6
jupyter-enterprise-gateway==3.2.2

@mmckerns
Copy link
Member

Can you post a simple example code that reproduces the issue you are seeing?

@linzhe138
Copy link

I have the same problem, error like below:

TypeError Traceback (most recent call last)
Cell In[8], line 1
----> 1 dill.dump_module(filename=file_path)

File ~/anaconda3/lib/python3.11/site-packages/dill/session.py:222, in dump_module(filename, module, refimported, **kwds)
220 main = _import_module(main)
221 if not isinstance(main, ModuleType):
--> 222 raise TypeError("%r is not a module" % main)
223 if hasattr(filename, 'write'):
224 file = filename

TypeError: <IPython.core.interactiveshell.DummyMod object at 0x7fca253708d0> is not a module

@linzhe138
Copy link

image

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

3 participants