Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is_task_done() cannot be used #40

Closed
MaxP92 opened this issue Dec 1, 2017 · 3 comments
Closed

is_task_done() cannot be used #40

MaxP92 opened this issue Dec 1, 2017 · 3 comments

Comments

@MaxP92
Copy link

MaxP92 commented Dec 1, 2017

When I do:
`

import nidaqmx
task = nidaqmx.Task()
task.is_task_done()
`

I get :

error "nidaqmx\task.py", line 522, in is_task_done return is_task_done.value nidaqmx\_lib.py", line 35, in _getter return bool(ctypes.c_uint.value.fget(self)) AttributeError: 'getset_descriptor' object has no attribute 'fget'


OS : windows 7 64 bits
Python : 3.5.2 with Anaconda 4.2.0 (32bits)
NIDAQmx : print(system.driver_version) = DriverVersion(major_version=9, minor_version=2, update_version=3)

@Wondernutz
Copy link
Collaborator

Hey Max,

Is that the exact code you're trying to execute? It looks like you're missing the assignment to task, i.e.:

task = nidaqmx.Task()

@MaxP92
Copy link
Author

MaxP92 commented Dec 1, 2017

Hello,

Sorry, wrong typing (see the updated code)

Actually I searched a bit and I found two options:

  • using the DAQmxGetTaskComplete property (available?)
  • Going in task.py and, in def is_task_done(self), change c_bool32() by ctypes.c_bool()

The last one works

Is there another solution ?

@Wondernutz
Copy link
Collaborator

Hi Max,

Thanks for bringing this issue to our attention. I'll submit a fix for this shortly.

Wondernutz added a commit that referenced this issue Dec 14, 2017
<rev> Fix issue 40: is_task_done() cannot be used.
#40

<rev> Fix issue 42: register signal event not supported?
#42
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

No branches or pull requests

2 participants