question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crashing on interactively defined functions (jupyter notebook): AttributeError: Can't get attribute on <module

See original GitHub issue
from joblib import Parallel, delayed
def f(x): return x**2
Parallel(n_jobs=3)(delayed(f)(i) for i in range(10))

yields:

  File "...\lib\multiprocessing\connection.py", line 251, in recv
    return _ForkingPickler.loads(buf.getbuffer())
AttributeError: Can't get attribute 'f' on <module '__main__' (built-in)>

Environment:

joblib: 0.11 Python: 3.6.1 Anaconda Jupyter Notebook Windows 10

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ogriselcommented, Jul 7, 2018

Have you tried with joblib 0.12? This should be fixed. If so let’s close this.

0reactions
albertcthomascommented, Sep 3, 2018

I ran into the same issue and I can also confirm that this is fixed in 0.12

Read more comments on GitHub >

github_iconTop Results From Across the Web

can't get attribute 'f' on <module '__main__' (built-in)> - You.com
I got multiprocessing to work from within a Jupyter notebook on Windows by saving my function in a separate .py file and including...
Read more >
how can I get rid of the error "Can't get attribute 'ut' on <module ...
pkl" so it is not empty. then I close the jupyter notebook and open another one and try to load the pickle file...
Read more >
Issues closed in the 1.0 development cycle
This documentation covers IPython versions 6.0 and higher. Beginning with version 6.0, IPython stopped supporting compatibility with Python versions lower than ...
Read more >
A Crash Course in Python for Scientists - | notebook.community
I find IPython notebooks an easy way both to get important work done in my ... and functions are not accessible from a...
Read more >
Python Timer Functions: Three Ways to Monitor Your Code
If you check out the built-in time module in Python, then you'll notice ... __class__ to get access to the class that defines...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found