Skip to content

UnboundLocalError 'channels' #4

@kwonminho97

Description

@kwonminho97

I'd like to convert Saleae logicpro pcm file to wav,
But it shows some issue.

  1. UnboundLocalError 'channels'

File "D:\python_project\pcm2wav2\PCM2Wav\PCM2Wav.py", line 54, in _generate
frame = self._calc_frame(channels)
UnboundLocalError: local variable 'channels' referenced before assignment

  1. short variable format issue.

Source code only support 'short' variable format:(-32768) <= supported value <= 32767
So, it makes error when value is out of range.
Some value was 65532,......
Can I modify "__formats = {1: 'c', 2: 'h'}" --> __formats = {1: 'c', 2: 'i'}?

  1. Can somebody share good example of csv file working with this source code?
  • I attached what I used csv file.

i2s.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions