Skip to content

Bug in InStream.readinto()#45

Merged
rares-pop merged 1 commit intoni:masterfrom
samuelgarcia:master
Sep 4, 2020
Merged

Bug in InStream.readinto()#45
rares-pop merged 1 commit intoni:masterfrom
samuelgarcia:master

Conversation

@samuelgarcia
Copy link
Contributor

Ensure number_of_samples_per_channel is int (and not numpy.int)
Otherwise ctype is buggy in _read_raw.

@samuelgarcia samuelgarcia mentioned this pull request Dec 20, 2017
@campagnola
Copy link

Here's an exception I encountered that would be fixed by this PR:

Traceback (most recent call last):
  File "our_code\ni_daqmx.py", line 232, in run
    nb_sample = aitask.in_stream.readinto(raw_data_flat)
  File "C:\Anaconda3\lib\site-packages\nidaqmx\_task_modules\in_stream.py", line 1992, in readinto
    self.timeout)
  File "C:\Anaconda3\lib\site-packages\nidaqmx\_task_modules\read_functions.py", line 583, in _read_raw
    ctypes.byref(number_of_bytes_per_sample), None)
ctypes.ArgumentError: argument 2: <class 'TypeError'>: wrong type

@rares-pop
Copy link

Thank you for the contribution!

@rares-pop rares-pop merged commit c4bfebd into ni:master Sep 4, 2020
@samuelgarcia
Copy link
Contributor Author

cool!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants