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.

Problems with core.py/python3

See original GitHub issue

I’ve got small error in ipython while using second example. Simple ‘xrange to range’ change fixed it.

In [19]:y_h, y_p = librosa.effects.hpss(y)

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-19-c68f0c36b61f> in <module>()
----> 1 y_h, y_p = librosa.effects.hpss(y)

/usr/local/lib/python3.4/site-packages/librosa/effects.py in hpss(y)
     36 
     37     # Compute the STFT matrix
---> 38     D = librosa.core.stft(y)
     39 
     40     # Decompose into harmonic and percussives

/usr/local/lib/python3.4/site-packages/librosa/core.py in stft(y, n_fft, hop_length, win_length, window, center, dtype)
    356                                       * stft_matrix.itemsize))
    357 
--> 358     for bl_s in xrange(0, stft_matrix.shape[1], n_columns):
    359         bl_t = min(bl_s + n_columns, stft_matrix.shape[1])
    360 

NameError: name 'xrange' is not defined

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
vmirnvcommented, Feb 27, 2016

Since I have this error again (now on EC2 Ubuntu) and this post is on Google’s top, here’s solution for missing mp3 library: sudo apt-get install libav-tools

0reactions
bmcfeecommented, Dec 6, 2016

@Kamatio Please do not add new questions to closed discussion threads about other topics.

Your problem appears to be due to not setting the value of hop_length; try saying hop_length = 512 before that call.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No module named 'core' when using pyping for Python 3
I am trying to import pyping for Python 3 but I am getting below error: virt01@ ...
Read more >
Python tracker: List of issues
ID GH Activity Status Creator Assigned To Type Msgs 2771 47020 7 months ago open gvanrossum ezio.melotti behavior 145 24778 68966 8 months ago open...
Read more >
2023-Master in Core Python Programming in 99Days - Udemy
You will learn, How to solve Real World Problems using Python Coding. You will learn Complete Core Python topics as Basics, Operators, Data...
Read more >
Troubleshoot Python errors in Azure Functions - Microsoft Learn
The package can't be found · The package isn't resolved with proper Linux wheel · The package is incompatible with the Python interpreter...
Read more >
Core Python Programming - Amazon.com
WESLEY J. CHUN, MSCS, is the author of Prentice Hall's bestselling "Core Python" book series (corepython.com), the "Python Fundamentals" companion video ...
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