Hi!
I get an exception when I try to access string features from my AVT cameras.
Traceback (most recent call last):
...
File "C:\Anaconda3\envs...\lib\site-packages\pymba\vimbaobject.py", line 37, in getattr
return VimbaFeature(attr, self._handle).value
File "C:\Anaconda3\envs...\lib\site-packages\pymba\vimbafeature.py", line 28, in value
return self._getSetTypeFuncs[self._info.featureDataType][0]()
File "C:\Anaconda3\envs...\lib\site-packages\pymba\vimbafeature.py", line 206, in _getStringFeature
valueToGet = create_string_buffer('\000' * bufferSize)
File "C:\Anaconda3\envs...\lib\ctypes__init__.py", line 63, in create_string_buffer
raise TypeError(init)
TypeError:
The exception is raised in the create_string_buffer() function in ctypes that expects either and intor an bytes parameter.
This is easy to fix by changing in vimbafeature.py the line (#206 as of now) from
valueToGet = create_string_buffer('\000' * bufferSize)
to
valueToGet = create_string_buffer(bufferSize)
Hi! I get an exception when I try to access string features from my AVT cameras.
The exception is raised in the
create_string_buffer()
function in ctypes that expects either andint
or anbytes
parameter.This is easy to fix by changing in vimbafeature.py the line (#206 as of now) from
valueToGet = create_string_buffer('\000' * bufferSize)
tovalueToGet = create_string_buffer(bufferSize)