Csound Csound-dev Csound-tekno Search About

[Csnd-dev] ctcsound7 import error

Date2025-01-08 19:03
Fromjoachim heintz
Subject[Csnd-dev] ctcsound7 import error
i have csound7 in latest develop installed.  when i try to import 
ctcsound7 i get this error:

 >>> import ctcsound7
Traceback (most recent call last):
   File "", line 1, in 
   File "/home/jh/.local/lib/python3.11/site-packages/ctcsound7.py", 
line 77, in 
     APIVERSION = libcsound.csoundGetAPIVersion()
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/lib/python3.11/ctypes/__init__.py", line 389, in __getattr__
     func = self.__getitem__(name)
            ^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/lib/python3.11/ctypes/__init__.py", line 394, in __getitem__
     func = self._FuncPtr((name_or_ordinal, self))
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: /usr/local/lib/libcsound64.so: undefined symbol: 
csoundGetAPIVersion

any idea how to solve?
thanks -
	joachim

Date2025-01-08 19:27
FromVictor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] ctcsound7 import error
That function was removed. There is a csoundGetVersion().

Prof. Victor Lazzarini
Maynooth University
Ireland

> On 8 Jan 2025, at 19:03, joachim heintz  wrote:
> 
> *Warning*
> 
> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
> 
> i have csound7 in latest develop installed.  when i try to import
> ctcsound7 i get this error:
> 
> >>> import ctcsound7
> Traceback (most recent call last):
>  File "", line 1, in 
>  File "/home/jh/.local/lib/python3.11/site-packages/ctcsound7.py",
> line 77, in 
>    APIVERSION = libcsound.csoundGetAPIVersion()
>                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>  File "/usr/lib/python3.11/ctypes/__init__.py", line 389, in __getattr__
>    func = self.__getitem__(name)
>           ^^^^^^^^^^^^^^^^^^^^^^
>  File "/usr/lib/python3.11/ctypes/__init__.py", line 394, in __getitem__
>    func = self._FuncPtr((name_or_ordinal, self))
>           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> AttributeError: /usr/local/lib/libcsound64.so: undefined symbol:
> csoundGetAPIVersion
> 
> any idea how to solve?
> thanks -
>       joachim

Date2025-01-08 19:40
Fromjoachim heintz
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] ctcsound7 import error
in line 77-78 of ctcsound.py i see:

APIVERSION = libcsound.csoundGetAPIVersion()
VERSION = libcsound.csoundGetVersion()

is there no difference any more between API version and version, or is 
there another function to return the version?

On 08/01/2025 20:27, Victor Lazzarini wrote:
> That function was removed. There is a csoundGetVersion().
> 
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
> 
>> On 8 Jan 2025, at 19:03, joachim heintz  wrote:
>>
>> *Warning*
>>
>> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>>
>> i have csound7 in latest develop installed.  when i try to import
>> ctcsound7 i get this error:
>>
>>>>> import ctcsound7
>> Traceback (most recent call last):
>>   File "", line 1, in 
>>   File "/home/jh/.local/lib/python3.11/site-packages/ctcsound7.py",
>> line 77, in 
>>     APIVERSION = libcsound.csoundGetAPIVersion()
>>                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>   File "/usr/lib/python3.11/ctypes/__init__.py", line 389, in __getattr__
>>     func = self.__getitem__(name)
>>            ^^^^^^^^^^^^^^^^^^^^^^
>>   File "/usr/lib/python3.11/ctypes/__init__.py", line 394, in __getitem__
>>     func = self._FuncPtr((name_or_ordinal, self))
>>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> AttributeError: /usr/local/lib/libcsound64.so: undefined symbol:
>> csoundGetAPIVersion
>>
>> any idea how to solve?
>> thanks -
>>        joachim

Date2025-01-08 19:49
FromVictor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] ctcsound7 import error
François will know better but I think you just remove the line for the function that doesn't exist.

Prof. Victor Lazzarini
Maynooth University
Ireland

> On 8 Jan 2025, at 19:40, joachim heintz  wrote:
> 
> in line 77-78 of ctcsound.py i see:
> 
> APIVERSION = libcsound.csoundGetAPIVersion()
> VERSION = libcsound.csoundGetVersion()
> 
> is there no difference any more between API version and version, or is there another function to return the version?
> 
>> On 08/01/2025 20:27, Victor Lazzarini wrote:
>> That function was removed. There is a csoundGetVersion().
>> Prof. Victor Lazzarini
>> Maynooth University
>> Ireland
>>>> On 8 Jan 2025, at 19:03, joachim heintz  wrote:
>>> 
>>> *Warning*
>>> 
>>> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>>> 
>>> i have csound7 in latest develop installed.  when i try to import
>>> ctcsound7 i get this error:
>>> 
>>>>>> import ctcsound7
>>> Traceback (most recent call last):
>>>  File "", line 1, in 
>>>  File "/home/jh/.local/lib/python3.11/site-packages/ctcsound7.py",
>>> line 77, in 
>>>    APIVERSION = libcsound.csoundGetAPIVersion()
>>>                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>  File "/usr/lib/python3.11/ctypes/__init__.py", line 389, in __getattr__
>>>    func = self.__getitem__(name)
>>>           ^^^^^^^^^^^^^^^^^^^^^^
>>>  File "/usr/lib/python3.11/ctypes/__init__.py", line 394, in __getitem__
>>>    func = self._FuncPtr((name_or_ordinal, self))
>>>           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>> AttributeError: /usr/local/lib/libcsound64.so: undefined symbol:
>>> csoundGetAPIVersion
>>> 
>>> any idea how to solve?
>>> thanks -
>>>       joachim

Date2025-01-08 19:53
Fromjoachim heintz
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] ctcsound7 import error
so if i get it right, there is no difference any more between csound 
version and api version.


On 08/01/2025 20:49, Victor Lazzarini wrote:
> François will know better but I think you just remove the line for the function that doesn't exist.
> 
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
> 
>> On 8 Jan 2025, at 19:40, joachim heintz  wrote:
>>
>> in line 77-78 of ctcsound.py i see:
>>
>> APIVERSION = libcsound.csoundGetAPIVersion()
>> VERSION = libcsound.csoundGetVersion()
>>
>> is there no difference any more between API version and version, or is there another function to return the version?
>>
>>> On 08/01/2025 20:27, Victor Lazzarini wrote:
>>> That function was removed. There is a csoundGetVersion().
>>> Prof. Victor Lazzarini
>>> Maynooth University
>>> Ireland
>>>>> On 8 Jan 2025, at 19:03, joachim heintz  wrote:
>>>>
>>>> *Warning*
>>>>
>>>> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>>>>
>>>> i have csound7 in latest develop installed.  when i try to import
>>>> ctcsound7 i get this error:
>>>>
>>>>>>> import ctcsound7
>>>> Traceback (most recent call last):
>>>>   File "", line 1, in 
>>>>   File "/home/jh/.local/lib/python3.11/site-packages/ctcsound7.py",
>>>> line 77, in 
>>>>     APIVERSION = libcsound.csoundGetAPIVersion()
>>>>                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>>   File "/usr/lib/python3.11/ctypes/__init__.py", line 389, in __getattr__
>>>>     func = self.__getitem__(name)
>>>>            ^^^^^^^^^^^^^^^^^^^^^^
>>>>   File "/usr/lib/python3.11/ctypes/__init__.py", line 394, in __getitem__
>>>>     func = self._FuncPtr((name_or_ordinal, self))
>>>>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>> AttributeError: /usr/local/lib/libcsound64.so: undefined symbol:
>>>> csoundGetAPIVersion
>>>>
>>>> any idea how to solve?
>>>> thanks -
>>>>        joachim

Date2025-01-08 20:05
Fromvlz
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] ctcsound7 import error
There is no separate API version string anymore.

Prof. Victor Lazzarini
Maynooth University
Ireland

> On 8 Jan 2025, at 19:53, joachim heintz  wrote:
> 
> so if i get it right, there is no difference any more between csound version and api version.
> 
> 
>> On 08/01/2025 20:49, Victor Lazzarini wrote:
>> François will know better but I think you just remove the line for the function that doesn't exist.
>> Prof. Victor Lazzarini
>> Maynooth University
>> Ireland
>>>> On 8 Jan 2025, at 19:40, joachim heintz  wrote:
>>> 
>>> in line 77-78 of ctcsound.py i see:
>>> 
>>> APIVERSION = libcsound.csoundGetAPIVersion()
>>> VERSION = libcsound.csoundGetVersion()
>>> 
>>> is there no difference any more between API version and version, or is there another function to return the version?
>>> 
>>>> On 08/01/2025 20:27, Victor Lazzarini wrote:
>>>> That function was removed. There is a csoundGetVersion().
>>>> Prof. Victor Lazzarini
>>>> Maynooth University
>>>> Ireland
>>>>>> On 8 Jan 2025, at 19:03, joachim heintz  wrote:
>>>>> 
>>>>> *Warning*
>>>>> 
>>>>> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>>>>> 
>>>>> i have csound7 in latest develop installed.  when i try to import
>>>>> ctcsound7 i get this error:
>>>>> 
>>>>>>>> import ctcsound7
>>>>> Traceback (most recent call last):
>>>>>  File "", line 1, in 
>>>>>  File "/home/jh/.local/lib/python3.11/site-packages/ctcsound7.py",
>>>>> line 77, in 
>>>>>    APIVERSION = libcsound.csoundGetAPIVersion()
>>>>>                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>>>  File "/usr/lib/python3.11/ctypes/__init__.py", line 389, in __getattr__
>>>>>    func = self.__getitem__(name)
>>>>>           ^^^^^^^^^^^^^^^^^^^^^^
>>>>>  File "/usr/lib/python3.11/ctypes/__init__.py", line 394, in __getitem__
>>>>>    func = self._FuncPtr((name_or_ordinal, self))
>>>>>           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>>> AttributeError: /usr/local/lib/libcsound64.so: undefined symbol:
>>>>> csoundGetAPIVersion
>>>>> 
>>>>> any idea how to solve?
>>>>> thanks -
>>>>>       joachim

Date2025-01-08 20:12
Fromjoachim heintz
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] ctcsound7 import error
thanks!

On 08/01/2025 21:05, vlz wrote:
> There is no separate API version string anymore.
> 
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
> 
>> On 8 Jan 2025, at 19:53, joachim heintz  wrote:
>>
>> so if i get it right, there is no difference any more between csound version and api version.
>>
>>
>>> On 08/01/2025 20:49, Victor Lazzarini wrote:
>>> François will know better but I think you just remove the line for the function that doesn't exist.
>>> Prof. Victor Lazzarini
>>> Maynooth University
>>> Ireland
>>>>> On 8 Jan 2025, at 19:40, joachim heintz  wrote:
>>>>
>>>> in line 77-78 of ctcsound.py i see:
>>>>
>>>> APIVERSION = libcsound.csoundGetAPIVersion()
>>>> VERSION = libcsound.csoundGetVersion()
>>>>
>>>> is there no difference any more between API version and version, or is there another function to return the version?
>>>>
>>>>> On 08/01/2025 20:27, Victor Lazzarini wrote:
>>>>> That function was removed. There is a csoundGetVersion().
>>>>> Prof. Victor Lazzarini
>>>>> Maynooth University
>>>>> Ireland
>>>>>>> On 8 Jan 2025, at 19:03, joachim heintz  wrote:
>>>>>>
>>>>>> *Warning*
>>>>>>
>>>>>> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>>>>>>
>>>>>> i have csound7 in latest develop installed.  when i try to import
>>>>>> ctcsound7 i get this error:
>>>>>>
>>>>>>>>> import ctcsound7
>>>>>> Traceback (most recent call last):
>>>>>>   File "", line 1, in 
>>>>>>   File "/home/jh/.local/lib/python3.11/site-packages/ctcsound7.py",
>>>>>> line 77, in 
>>>>>>     APIVERSION = libcsound.csoundGetAPIVersion()
>>>>>>                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>>>>   File "/usr/lib/python3.11/ctypes/__init__.py", line 389, in __getattr__
>>>>>>     func = self.__getitem__(name)
>>>>>>            ^^^^^^^^^^^^^^^^^^^^^^
>>>>>>   File "/usr/lib/python3.11/ctypes/__init__.py", line 394, in __getitem__
>>>>>>     func = self._FuncPtr((name_or_ordinal, self))
>>>>>>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>>>> AttributeError: /usr/local/lib/libcsound64.so: undefined symbol:
>>>>>> csoundGetAPIVersion
>>>>>>
>>>>>> any idea how to solve?
>>>>>> thanks -
>>>>>>        joachim

Date2025-01-09 13:45
Fromjoachim heintz
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] ctcsound7 import error
PS and if someone hits the same issue:
this was not the new version of ctcsound but an older version of 
eduardo's wrapper which is now (much better) called libcsound 
(https://github.com/csound-plugins/libcsound).
françois' new version for the CS7 API ist still called ctcsound and 
works perfectly.
for the difference between both versions françois added a paragraph at 
https://csound.com/csound-python.html.
the source file is 
https://github.com/csound/csound/blob/develop/Python/ctcsound.py


On 08/01/2025 21:12, joachim heintz wrote:
> thanks!
> 
> On 08/01/2025 21:05, vlz wrote:
>> There is no separate API version string anymore.
>>
>> Prof. Victor Lazzarini
>> Maynooth University
>> Ireland
>>
>>> On 8 Jan 2025, at 19:53, joachim heintz  wrote:
>>>
>>> so if i get it right, there is no difference any more between csound 
>>> version and api version.
>>>
>>>
>>>> On 08/01/2025 20:49, Victor Lazzarini wrote:
>>>> François will know better but I think you just remove the line for 
>>>> the function that doesn't exist.
>>>> Prof. Victor Lazzarini
>>>> Maynooth University
>>>> Ireland
>>>>>> On 8 Jan 2025, at 19:40, joachim heintz  wrote:
>>>>>
>>>>> in line 77-78 of ctcsound.py i see:
>>>>>
>>>>> APIVERSION = libcsound.csoundGetAPIVersion()
>>>>> VERSION = libcsound.csoundGetVersion()
>>>>>
>>>>> is there no difference any more between API version and version, or 
>>>>> is there another function to return the version?
>>>>>
>>>>>> On 08/01/2025 20:27, Victor Lazzarini wrote:
>>>>>> That function was removed. There is a csoundGetVersion().
>>>>>> Prof. Victor Lazzarini
>>>>>> Maynooth University
>>>>>> Ireland
>>>>>>>> On 8 Jan 2025, at 19:03, joachim heintz  
>>>>>>>> wrote:
>>>>>>>
>>>>>>> *Warning*
>>>>>>>
>>>>>>> This email originated from outside of Maynooth University's Mail 
>>>>>>> System. Do not reply, click links or open attachments unless you 
>>>>>>> recognise the sender and know the content is safe.
>>>>>>>
>>>>>>> i have csound7 in latest develop installed.  when i try to import
>>>>>>> ctcsound7 i get this error:
>>>>>>>
>>>>>>>>>> import ctcsound7
>>>>>>> Traceback (most recent call last):
>>>>>>>   File "", line 1, in 
>>>>>>>   File "/home/jh/.local/lib/python3.11/site-packages/ctcsound7.py",
>>>>>>> line 77, in 
>>>>>>>     APIVERSION = libcsound.csoundGetAPIVersion()
>>>>>>>                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>>>>>   File "/usr/lib/python3.11/ctypes/__init__.py", line 389, in 
>>>>>>> __getattr__
>>>>>>>     func = self.__getitem__(name)
>>>>>>>            ^^^^^^^^^^^^^^^^^^^^^^
>>>>>>>   File "/usr/lib/python3.11/ctypes/__init__.py", line 394, in 
>>>>>>> __getitem__
>>>>>>>     func = self._FuncPtr((name_or_ordinal, self))
>>>>>>>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>>>>> AttributeError: /usr/local/lib/libcsound64.so: undefined symbol:
>>>>>>> csoundGetAPIVersion
>>>>>>>
>>>>>>> any idea how to solve?
>>>>>>> thanks -
>>>>>>>        joachim