Csound Csound-dev Csound-tekno Search About

[Csnd] pycall2 must return 2 values

Date2017-12-22 17:37
FromRoger Kelly
Subject[Csnd] pycall2 must return 2 values

The below gives the error that pycall2 must return 2 values.  Function "e"

does return 2 so I am puzzled as to what is wrong.




<CsoundSynthesizer>

<CsOptions>

--env:SSDIR+=../SourceMaterials -dnm0

</CsOptions>

<CsInstruments>


pyinit


pyruni {{


def e(b):

return 1.0,1.0


}} ;Define function "average"


instr 1 ;call it

kave,kv pycall2 "e", p4


endin


</CsInstruments>

<CsScore>

i 1 0 1 100 200

i 1 1 1 1000 2000

</CsScore>

</CsoundSynthesizer>


Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2017-12-22 22:19
FromVictor Lazzarini
SubjectRe: [Csnd] pycall2 must return 2 values
Works here if the Python code is fixed to have the correct indentation for ‘return'
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 22 Dec 2017, at 17:37, Roger Kelly  wrote:
> 
> The below gives the error that pycall2 must return 2 values.  Function "e"
> does return 2 so I am puzzled as to what is wrong.
> 
> 
> 
> 
> 
> --env:SSDIR+=../SourceMaterials -dnm0
> 
> 
> 
> pyinit
> 
> pyruni {{
> 
> def e(b):
> return 1.0,1.0
> 
> }} ;Define function "average"
> 
> instr 1 ;call it
> kave,kv pycall2 "e", p4
> 
> endin
> 
> 
> 
> i 1 0 1 100 200
> i 1 1 1 1000 2000
> 
> 
> 
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here


Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2017-12-24 05:02
FromRoger Kelly
SubjectRe: [Csnd] pycall2 must return 2 values
The missing indent is actually a copy error on my part.  I have it indented in my source code.

After some more research, I found this bug discussed in github:


I am on Windows 10. Wondered if this was not fixed on Windows?


On Fri, Dec 22, 2017 at 4:19 PM, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
Works here if the Python code is fixed to have the correct indentation for ‘return'
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 22 Dec 2017, at 17:37, Roger Kelly <loraxman@gmail.com> wrote:
>
> The below gives the error that pycall2 must return 2 values.  Function "e"
> does return 2 so I am puzzled as to what is wrong.
>
>
>
> <CsoundSynthesizer>
> <CsOptions>
> --env:SSDIR+=../SourceMaterials -dnm0
> </CsOptions>
> <CsInstruments>
>
> pyinit
>
> pyruni {{
>
> def e(b):
> return 1.0,1.0
>
> }} ;Define function "average"
>
> instr 1 ;call it
> kave,kv pycall2 "e", p4
>
> endin
>
> </CsInstruments>
> <CsScore>
> i 1 0 1 100 200
> i 1 1 1 1000 2000
> </CsScore>
> </CsoundSynthesizer>
>
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here


Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2017-12-24 10:28
FromVictor Lazzarini
SubjectRe: [Csnd] pycall2 must return 2 values
probably not then, we need to ask the windows devs.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 24 Dec 2017, at 05:02, Roger Kelly <loraxman+csound@GMAIL.COM> wrote:

The missing indent is actually a copy error on my part.  I have it indented in my source code.

After some more research, I found this bug discussed in github:


I am on Windows 10. Wondered if this was not fixed on Windows?


On Fri, Dec 22, 2017 at 4:19 PM, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
Works here if the Python code is fixed to have the correct indentation for ‘return'
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 22 Dec 2017, at 17:37, Roger Kelly <loraxman@gmail.com> wrote:
>
> The below gives the error that pycall2 must return 2 values.  Function "e"
> does return 2 so I am puzzled as to what is wrong.
>
>
>
> <CsoundSynthesizer>
> <CsOptions>
> --env:SSDIR+=../SourceMaterials -dnm0
> </CsOptions>
> <CsInstruments>
>
> pyinit
>
> pyruni {{
>
> def e(b):
> return 1.0,1.0
>
> }} ;Define function "average"
>
> instr 1 ;call it
> kave,kv pycall2 "e", p4
>
> endin
>
> </CsInstruments>
> <CsScore>
> i 1 0 1 100 200
> i 1 1 1 1000 2000
> </CsScore>
> </CsoundSynthesizer>
>
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here


Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2017-12-24 10:34
FromRory Walsh
SubjectRe: [Csnd] pycall2 must return 2 values
Looks like that issue was a result of my build settings at that time. Oeyvind is still using Python a lot on Windows. I wonder if he has encountered this issue? 

On 24 Dec 2017 11:29 a.m., "Victor Lazzarini" <Victor.Lazzarini@mu.ie> wrote:
probably not then, we need to ask the windows devs.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 24 Dec 2017, at 05:02, Roger Kelly <loraxman+csound@GMAIL.COM> wrote:

The missing indent is actually a copy error on my part.  I have it indented in my source code.

After some more research, I found this bug discussed in github:


I am on Windows 10. Wondered if this was not fixed on Windows?


On Fri, Dec 22, 2017 at 4:19 PM, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
Works here if the Python code is fixed to have the correct indentation for ‘return'
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 22 Dec 2017, at 17:37, Roger Kelly <loraxman@gmail.com> wrote:
>
> The below gives the error that pycall2 must return 2 values.  Function "e"
> does return 2 so I am puzzled as to what is wrong.
>
>
>
> <CsoundSynthesizer>
> <CsOptions>
> --env:SSDIR+=../SourceMaterials -dnm0
> </CsOptions>
> <CsInstruments>
>
> pyinit
>
> pyruni {{
>
> def e(b):
> return 1.0,1.0
>
> }} ;Define function "average"
>
> instr 1 ;call it
> kave,kv pycall2 "e", p4
>
> endin
>
> </CsInstruments>
> <CsScore>
> i 1 0 1 100 200
> i 1 1 1 1000 2000
> </CsScore>
> </CsoundSynthesizer>
>
> Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here


Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2017-12-24 11:24
FromJohn ff
SubjectRe: [Csnd] pycall2 must return 2 values
Or could be the prelexer squashing spaces, in which case it is my error.

⁣Sent from TypeApp ​

On Dec 24, 2017, 10:35, at 10:35, Rory Walsh  wrote:
>Looks like that issue was a result of my build settings at that time.
>Oeyvind is still using Python a lot on Windows. I wonder if he has
>encountered this issue?
>
>On 24 Dec 2017 11:29 a.m., "Victor Lazzarini" 
>wrote:
>
>> probably not then, we need to ask the windows devs.
>>
>> Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy
>> Maynooth University
>> Ireland
>>
>> On 24 Dec 2017, at 05:02, Roger Kelly 
>wrote:
>>
>> The missing indent is actually a copy error on my part.  I have it
>> indented in my source code.
>>
>> After some more research, I found this bug discussed in github:
>>
>> https://github.com/csound/csound/issues/730
>>
>> I am on Windows 10. Wondered if this was not fixed on Windows?
>>
>>
>> On Fri, Dec 22, 2017 at 4:19 PM, Victor Lazzarini
>
>> wrote:
>>
>>> Works here if the Python code is fixed to have the correct
>indentation
>>> for ‘return'
>>> ========================
>>> Prof. Victor Lazzarini
>>> Dean of Arts, Celtic Studies, and Philosophy,
>>> Maynooth University,
>>> Maynooth, Co Kildare, Ireland
>>> Tel: 00 353 7086936
>>> Fax: 00 353 1 7086952
>>>
>>> > On 22 Dec 2017, at 17:37, Roger Kelly  wrote:
>>> >
>>> > The below gives the error that pycall2 must return 2 values. 
>Function
>>> "e"
>>> > does return 2 so I am puzzled as to what is wrong.
>>> >
>>> >
>>> >
>>> > 
>>> > 
>>> > --env:SSDIR+=../SourceMaterials -dnm0
>>> > 
>>> > 
>>> >
>>> > pyinit
>>> >
>>> > pyruni {{
>>> >
>>> > def e(b):
>>> > return 1.0,1.0
>>> >
>>> > }} ;Define function "average"
>>> >
>>> > instr 1 ;call it
>>> > kave,kv pycall2 "e", p4
>>> >
>>> > endin
>>> >
>>> > 
>>> > 
>>> > i 1 0 1 100 200
>>> > i 1 1 1 1000 2000
>>> > 
>>> > 
>>> >
>>> > Csound mailing list Csound@listserv.heanet.ie
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
>>> https://github.com/csound/csound/issues Discussions of bugs and
>features
>>> can be posted here
>>>
>>>
>>> Csound mailing list
>>> Csound@listserv.heanet.ie
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>         https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>>
>>
>> Csound mailing list Csound@listserv.heanet.ie
>https://listserv.heanet.ie/
>> cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/
>> csound/issues Discussions of bugs and features can be posted here
>>
>> Csound mailing list Csound@listserv.heanet.ie
>https://listserv.heanet.ie/
>> cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/
>> csound/issues Discussions of bugs and features can be posted here
>
>Csound mailing list
>Csound@listserv.heanet.ie
>https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>Send bugs reports to
>        https://github.com/csound/csound/issues
>Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2017-12-24 11:44
FromRory Walsh
SubjectRe: [Csnd] pycall2 must return 2 values
Roger can I ask if you are using the very latest 6.10 release for Windows? I can run your example here with the latest 6.10 build for Windows and I get no errors. Can you try updating? 

On 24 December 2017 at 11:24, John ff <jpff@codemist.co.uk> wrote:
Or could be the prelexer squashing spaces, in which case it is my error.

⁣Sent from TypeApp ​

On Dec 24, 2017, 10:35, at 10:35, Rory Walsh <rorywalsh@EAR.IE> wrote:
>Looks like that issue was a result of my build settings at that time.
>Oeyvind is still using Python a lot on Windows. I wonder if he has
>encountered this issue?
>
>On 24 Dec 2017 11:29 a.m., "Victor Lazzarini" <Victor.Lazzarini@mu.ie>
>wrote:
>
>> probably not then, we need to ask the windows devs.
>>
>> Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy
>> Maynooth University
>> Ireland
>>
>> On 24 Dec 2017, at 05:02, Roger Kelly <loraxman+csound@GMAIL.COM>
>wrote:
>>
>> The missing indent is actually a copy error on my part.  I have it
>> indented in my source code.
>>
>> After some more research, I found this bug discussed in github:
>>
>> https://github.com/csound/csound/issues/730
>>
>> I am on Windows 10. Wondered if this was not fixed on Windows?
>>
>>
>> On Fri, Dec 22, 2017 at 4:19 PM, Victor Lazzarini
><Victor.Lazzarini@mu.ie>
>> wrote:
>>
>>> Works here if the Python code is fixed to have the correct
>indentation
>>> for ‘return'
>>> ========================
>>> Prof. Victor Lazzarini
>>> Dean of Arts, Celtic Studies, and Philosophy,
>>> Maynooth University,
>>> Maynooth, Co Kildare, Ireland
>>> Tel: 00 353 7086936
>>> Fax: 00 353 1 7086952
>>>
>>> > On 22 Dec 2017, at 17:37, Roger Kelly <loraxman@gmail.com> wrote:
>>> >
>>> > The below gives the error that pycall2 must return 2 values.
>Function
>>> "e"
>>> > does return 2 so I am puzzled as to what is wrong.
>>> >
>>> >
>>> >
>>> > <CsoundSynthesizer>
>>> > <CsOptions>
>>> > --env:SSDIR+=../SourceMaterials -dnm0
>>> > </CsOptions>
>>> > <CsInstruments>
>>> >
>>> > pyinit
>>> >
>>> > pyruni {{
>>> >
>>> > def e(b):
>>> > return 1.0,1.0
>>> >
>>> > }} ;Define function "average"
>>> >
>>> > instr 1 ;call it
>>> > kave,kv pycall2 "e", p4
>>> >
>>> > endin
>>> >
>>> > </CsInstruments>
>>> > <CsScore>
>>> > i 1 0 1 100 200
>>> > i 1 1 1 1000 2000
>>> > </CsScore>
>>> > </CsoundSynthesizer>
>>> >
>>> > Csound mailing list Csound@listserv.heanet.ie
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
>>> https://github.com/csound/csound/issues Discussions of bugs and
>features
>>> can be posted here
>>>
>>>
>>> Csound mailing list
>>> Csound@listserv.heanet.ie
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>         https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>>
>>
>> Csound mailing list Csound@listserv.heanet.ie
>https://listserv.heanet.ie/
>> cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/
>> csound/issues Discussions of bugs and features can be posted here
>>
>> Csound mailing list Csound@listserv.heanet.ie
>https://listserv.heanet.ie/
>> cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/
>> csound/issues Discussions of bugs and features can be posted here
>
>Csound mailing list
>Csound@listserv.heanet.ie
>https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>Send bugs reports to
>        https://github.com/csound/csound/issues
>Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2017-12-24 17:24
FromRoger Kelly
SubjectRe: [Csnd] pycall2 must return 2 values
I upgraded to 6.10. That fixed it!  Thanks much!

On Sun, Dec 24, 2017 at 5:44 AM, Rory Walsh <rorywalsh@ear.ie> wrote:
Roger can I ask if you are using the very latest 6.10 release for Windows? I can run your example here with the latest 6.10 build for Windows and I get no errors. Can you try updating? 

On 24 December 2017 at 11:24, John ff <jpff@codemist.co.uk> wrote:
Or could be the prelexer squashing spaces, in which case it is my error.

⁣Sent from TypeApp ​

On Dec 24, 2017, 10:35, at 10:35, Rory Walsh <rorywalsh@EAR.IE> wrote:
>Looks like that issue was a result of my build settings at that time.
>Oeyvind is still using Python a lot on Windows. I wonder if he has
>encountered this issue?
>
>On 24 Dec 2017 11:29 a.m., "Victor Lazzarini" <Victor.Lazzarini@mu.ie>
>wrote:
>
>> probably not then, we need to ask the windows devs.
>>
>> Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy
>> Maynooth University
>> Ireland
>>
>> On 24 Dec 2017, at 05:02, Roger Kelly <loraxman+csound@GMAIL.COM>
>wrote:
>>
>> The missing indent is actually a copy error on my part.  I have it
>> indented in my source code.
>>
>> After some more research, I found this bug discussed in github:
>>
>> https://github.com/csound/csound/issues/730
>>
>> I am on Windows 10. Wondered if this was not fixed on Windows?
>>
>>
>> On Fri, Dec 22, 2017 at 4:19 PM, Victor Lazzarini
><Victor.Lazzarini@mu.ie>
>> wrote:
>>
>>> Works here if the Python code is fixed to have the correct
>indentation
>>> for ‘return'
>>> ========================
>>> Prof. Victor Lazzarini
>>> Dean of Arts, Celtic Studies, and Philosophy,
>>> Maynooth University,
>>> Maynooth, Co Kildare, Ireland
>>> Tel: 00 353 7086936
>>> Fax: 00 353 1 7086952
>>>
>>> > On 22 Dec 2017, at 17:37, Roger Kelly <loraxman@gmail.com> wrote:
>>> >
>>> > The below gives the error that pycall2 must return 2 values.
>Function
>>> "e"
>>> > does return 2 so I am puzzled as to what is wrong.
>>> >
>>> >
>>> >
>>> > <CsoundSynthesizer>
>>> > <CsOptions>
>>> > --env:SSDIR+=../SourceMaterials -dnm0
>>> > </CsOptions>
>>> > <CsInstruments>
>>> >
>>> > pyinit
>>> >
>>> > pyruni {{
>>> >
>>> > def e(b):
>>> > return 1.0,1.0
>>> >
>>> > }} ;Define function "average"
>>> >
>>> > instr 1 ;call it
>>> > kave,kv pycall2 "e", p4
>>> >
>>> > endin
>>> >
>>> > </CsInstruments>
>>> > <CsScore>
>>> > i 1 0 1 100 200
>>> > i 1 1 1 1000 2000
>>> > </CsScore>
>>> > </CsoundSynthesizer>
>>> >
>>> > Csound mailing list Csound@listserv.heanet.ie
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
>>> https://github.com/csound/csound/issues Discussions of bugs and
>features
>>> can be posted here
>>>
>>>
>>> Csound mailing list
>>> Csound@listserv.heanet.ie
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>         https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>>
>>
>> Csound mailing list Csound@listserv.heanet.ie
>https://listserv.heanet.ie/
>> cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/
>> csound/issues Discussions of bugs and features can be posted here
>>
>> Csound mailing list Csound@listserv.heanet.ie
>https://listserv.heanet.ie/
>> cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/
>> csound/issues Discussions of bugs and features can be posted here
>
>Csound mailing list
>Csound@listserv.heanet.ie
>https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>Send bugs reports to
>        https://github.com/csound/csound/issues
>Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here