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.

AttributeError: module 'inspect' has no attribute 'isgenerator'

See original GitHub issue

The latest version of librosa seems to errors out at import. Below is the full error message I get on pycharm

`Traceback (most recent call last): File “C:/Users/tkim1/.PyCharmCE2018.2/config/scratches/SpecCen.py”, line 1, in <module> import librosa

File “C:\Users\tkim1\PycharmProjects\Attempt1\venv\lib\site-packages\librosa_init_.py”, line 11, in <module> from . import cache

File “C:\Users\tkim1\PycharmProjects\Attempt1\venv\lib\site-packages\librosa\cache.py”, line 7, in <module> from joblib import Memory

File “C:\Users\tkim1\PycharmProjects\Attempt1\venv\lib\site-packages\joblib_init_.py”, line 112, in <module> from .memory import Memory, MemorizedResult, register_store_backend

File “C:\Users\tkim1\PycharmProjects\Attempt1\venv\lib\site-packages\joblib\memory.py”, line 15, in <module> import pydoc

File “C:\Users\tkim1\AppData\Local\Programs\Python\Python37\lib\pydoc.py”, line 62, in <module> import inspect

File “C:\Users\tkim1.PyCharmCE2018.2\config\scratches\inspect.py”, line 3, in <module> import twitter_scraper as module

File “C:\Users\tkim1\PycharmProjects\Attempt1\venv\lib\site-packages\twitter_scraper.py”, line 2, in <module> from requests_html import HTMLSession, HTML

File “C:\Users\tkim1\PycharmProjects\Attempt1\venv\lib\site-packages\requests_html.py”, line 2, in <module> import asyncio

File “C:\Users\tkim1\AppData\Local\Programs\Python\Python37\lib\asyncio_init_.py”, line 8, in <module> from .base_events import *

File “C:\Users\tkim1\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py”, line 39, in <module> from . import events

File “C:\Users\tkim1\AppData\Local\Programs\Python\Python37\lib\asyncio\events.py”, line 787, in <module> from _asyncio import (_get_running_loop, _set_running_loop,

AttributeError: module ‘inspect’ has no attribute ‘isgenerator’`

I tried to rollback to previous versions of librosa to see if that would solve anything but did not have any luck

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
srubenackercommented, Aug 14, 2019

@lostanlen You were right, my issue was caused by an old version of joblib (0.11). I upgraded it to 0.13.2 and now librosa 0.7.0 works. Thanks for your help. I will definitely look into using conda from now on.

0reactions
lostanlencommented, Aug 13, 2019

@srubenacker upgrading from 0.5.1 to 0.7.0 is a pretty huge leap, so you are going to have to make sure that all of the other installed packages are also upgraded accordingly. In a conda environment, this would be automatic. My guess is that your installation of librosa interferes with other packages (in this case joblib). My advice is to always install librosa in a conda environment, unless you have a really compelling reason not to do so. If i were to debug your installation, the first command i would try is: which python3

and if it’s a pip python: pip freeze

Read more comments on GitHub >

github_iconTop Results From Across the Web

module 'inspect' has no attribute 'getsource' using Textmate ...
I fixed it. I had a user sample script called inspect.py which was using the inspect module in the same directory which was...
Read more >
inspect — Inspect live objects — Python 3.11.1 documentation
Source code: Lib/inspect.py The inspect module provides several useful ... If the parameter has no annotation, this attribute is set to Parameter.empty ....
Read more >
AttributeError: partially initialized module has no attribute ...
In this case I am looking at using the Python logging module and saved my Python file as logging.py, so when I then...
Read more >
Source code for inspect - XClim - Read the Docs
"""Get useful information from live Python objects. This module encapsulates the interface provided by the internal special attributes (co_*, im_*, tb_*, ...
Read more >
[Solved] AttributeError: 'module' object has no attribute
Click here to subscribe - https://www.youtube.com/channel/UCeVMnSShP_Iviwkknt83cww▻Instagram ...
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