Skip to content

Dropped final character in saved filename with mic.record #875

@gciccarelli3

Description

@gciccarelli3

Hi,

filename = '../data/20150312094043_voice_ID1000_S001_T001_R001_pataka'
microphone.switchOn()
core.wait(3)
mic.microphone.AdvAudioCapture(name='mic', stereo = False)
mic.record(sec=20, block=False, filename = filename + '.wav')
Using this line to specify file name results in 20150312094043_voice_ID1000_S001_T001_R001_patak.wav instead of 20150312094043_voice_ID1000_S001_T001_R001_pataka.wav
Note the dropped 'a' at the end of pataka

However, by adding an intermediate character in the concatenation, all characters are used.

mic.record(sec=20, block=False, filename = filename + '123456' + '.wav')
20150312094043_voice_ID1000_S001_T001_R001_pataka123456.wav

This could be my misunderstanding of how python concatenate works somehow.

This error does not happen with a shorter filename e.g. filename = '../data/mySubject1234' writes out as mySubject1234.wav

Using Psychop v1.81.03 on mac 10.8.2

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions