Open and Close Error in Python | LabJack
 

Open and Close Error in Python

3 posts / 0 new
Last post
spurious
rick.kimoto's picture
Open and Close Error in Python

Hi,

I'm using U6 with LabJackPython on OSX (exodriver).  I am not able to consistently close and reopen the device.  See example code below.  If I insert a d.getName() before closing the device, then it does not give me an error.

Any help would be appreciated.

import u6

d = u6.U6()

d.close()

d = u6.U6()

File Attachment: 
LabJack Support
labjack support's picture
If you are using OS X 10.11,

If you are using OS X 10.11, El Capitan, update it to the latest version (10.11.4 and newer). There were some El Capitan USB bugs causing LabJack communications issues after reopening which would cause issues in your code. The latest El Capitan update seemed to resolve the issue.

Note that:

d = u6.U6()
d.close()
d = u6.U6()

Should normally run fine, but I would expect issues with the following if you have one U6 connected to your Mac:

d = u6.U6()
d = u6.U6()

The second call will fail since your U6 is claimed and cannot be opened again until its handle is closed.

spurious
rick.kimoto's picture
Thank you.  That worked for

Thank you.  That worked for me.  I was on 10.11.3.