Skip to content
This repository has been archived by the owner on Feb 17, 2022. It is now read-only.

'NoneType' object has no attribute 'channels' #25

Closed
Riccardo451 opened this issue May 15, 2019 · 9 comments
Closed

'NoneType' object has no attribute 'channels' #25

Riccardo451 opened this issue May 15, 2019 · 9 comments

Comments

@Riccardo451
Copy link

Trying on OSX python3 to apply reverb to mic with the command: python -c "from pysndfx import AudioEffectsChain; AudioEffectsChain().reverb()(None, None)"

I get the following error:
Traceback (most recent call last):
File "EQ_test.py", line 3, in
AudioEffectsChain().bandpass(1000, q=1.0)(None, None)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pysndfx/dsp.py", line 387, in call
channels_out = infile.channels
AttributeError: 'NoneType' object has no attribute 'channels'

how I am supposed to define the input and output channels?
thank you for the help, I am pretty new to python

@ehsundar
Copy link

I have the same problem on Ubuntu 19

@SutirthaChakraborty
Copy link

Did you solve it ? Let me know if you did

@BartMassey
Copy link
Contributor

from pysndfx import AudioEffectsChain; AudioEffectsChain().reverb()(None, None, channels_out=1)

This works.

@BartMassey
Copy link
Contributor

I put in PR #31 to fix this.

@carlthome
Copy link
Owner

Great stuff @BartMassey!

The underlying issue is that the live streaming example has no test coverage (at the time of writing it, it was mostly a curiosity for me rather than intended usage) and with @hadware's changes we missed that the code example stopped working. If anyone has a nice idea of how to test such a feature (e.g. mocking streams offline, somehow), tips would be much appreciated.

@hadware
Copy link
Contributor

hadware commented Jun 1, 2020

I'm sorry for breaking that 🤐

@BartMassey
Copy link
Contributor

Might I suggest closing this issue (since the immediate problem has been resolved) and opening a new issue for the testing question?

@carlthome
Copy link
Owner

Absolutely, @BartMassey

@hadware not your fault! No coverage: my fault.

@Riccardo451 feel free to reopen if you still have problems.

@carlthome
Copy link
Owner

#33

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

No branches or pull requests

6 participants