Multiclamp:: [Error 193] %1 is not a valid Win 32 application

203 views
Skip to first unread message

Iris Oren

unread,
Feb 14, 2014, 9:11:18 AM2/14/14
to ac...@googlegroups.com
Hi,
 
Firstly, many thanks for publishing this and making Acq4 available.
 
I have installed Acq4 under win7 x64, and installed the x64 versions of python. The demo version of Acq4 runs, and I am now trying to modify the devices.cfg to get Acq4 to talk to my Multiclamp700A.
 
I have tried to follow the advice of leaving the channel ID blank ("channelID: '' "), and also tried to specify the device number and com port that are displayed in my multiclamp commander.  However, in either configuration, when I start Acq4 (with multiclamp commander running, and the amplifier on), I get  the below error, with no option to select the correct channel ID from a list of strings.
 
Could you advise?
 
Regards,
Iris
 
"WindowsError: [Error 193] %1 is not a valid Win32 application
  File "c:\python27\lib\runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "c:\python27\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "c:\acq4\acq4\__main__.py", line 30, in <module>
    man = Manager(argv=sys.argv[1:])
  File "acq4\Manager.py", line 214, in __init__
    self.readConfig(configFile)
  File "acq4\Manager.py", line 297, in readConfig
    self.configure(cfg)
  File "acq4\Manager.py", line 324, in configure
    printExc("Error configuring device %s:" % k)
  File "acq4\util\debug.py", line 22, in printExc
    acq4.Manager.logExc(msg=msg, msgType=msgType)
------- exception caught ---------->
  File "acq4\Manager.py", line 322, in configure
    self.loadDevice(driverName, conf, k)
  File "acq4\Manager.py", line 436, in loadDevice
    mod = __import__('acq4.devices.%s' % driverName, fromlist=['*'])
  File "acq4\devices\MultiClamp\__init__.py", line 1, in <module>
    from MultiClamp import *
  File "acq4\devices\MultiClamp\MultiClamp.py", line 3, in <module>
    from acq4.drivers.MultiClamp.MultiClamp import MultiClamp as MultiClampDriver
  File "acq4\drivers\MultiClamp\__init__.py", line 1, in <module>
    from MultiClamp import *
  File "acq4\drivers\MultiClamp\MultiClamp.py", line 29, in <module>
    axlib = CLibrary(windll.LoadLibrary(os.path.join(d, 'AxMultiClampMsg.dll')), axonDefs, prefix='MCCMSG_')
  File "c:\python27\lib\ctypes\__init__.py", line 443, in LoadLibrary
    return self._dlltype(name)
  File "c:\python27\lib\ctypes\__init__.py", line 365, in __init__
    self._handle = _dlopen(self._name, mode)

Luke Campagnola

unread,
Feb 14, 2014, 9:33:49 AM2/14/14
to ac...@googlegroups.com
On Fri, Feb 14, 2014 at 9:11 AM, Iris Oren <iris...@gmail.com> wrote:
I have installed Acq4 under win7 x64, and installed the x64 versions of python. The demo version of Acq4 runs, and I am now trying to modify the devices.cfg to get Acq4 to talk to my Multiclamp700A.
 
I have tried to follow the advice of leaving the channel ID blank ("channelID: '' "), and also tried to specify the device number and com port that are displayed in my multiclamp commander.  However, in either configuration, when I start Acq4 (with multiclamp commander running, and the amplifier on), I get  the below error, with no option to select the correct channel ID from a list of strings.
 
Could you advise?
 
Regards,
Iris
 
"WindowsError: [Error 193] %1 is not a valid Win32 application
[ snip]
  File "acq4\drivers\MultiClamp\MultiClamp.py", line 29, in <module>
    axlib = CLibrary(windll.LoadLibrary(os.path.join(d, 'AxMultiClampMsg.dll')), axonDefs, prefix='MCCMSG_')
  File "c:\python27\lib\ctypes\__init__.py", line 443, in LoadLibrary
    return self._dlltype(name)
  File "c:\python27\lib\ctypes\__init__.py", line 365, in __init__
    self._handle = _dlopen(self._name, mode)


Greetings, Iris!

I have not seen this before on Win7 machines, but I suspect the "not a valid Win32 application" is in reference to the version of AxMultiClampMsg.dll that is included with acq4 (located at acq4/lib/drivers/MultiClamp/). Could you try replacing this with the same file as provided in your MultiClamp Commander installation? It might also be necessary to replace the .h file, but let's just start with the DLL.

The MC drivers have caused us a lot of pain in the past. Ultimately we'd like to circumvent the need to use Commander, but we have hesitated out of fear of damaging the MultiClamp :)


Luke

Iris Oren

unread,
Feb 14, 2014, 10:47:23 AM2/14/14
to ac...@googlegroups.com
Hi Luke,
 
Thanks for the quick reply...really appreciated.
 
I tried replacing both the .dll and .h, but it still gives the same error. Could it be because the MC700A commander has not been updated to run on win7 or x64?
 
If need be, I might be able to install a 32 bit version of windows, as this PC has been freshly formatted anyway. Do you think that might help, or could there be less drastic measures to try first?
 
Thanks again
Iris

Luke Campagnola

unread,
Feb 14, 2014, 12:19:00 PM2/14/14
to acq4
On Fri, Feb 14, 2014 at 10:47 AM, Iris Oren <iris...@gmail.com> wrote:
I tried replacing both the .dll and .h, but it still gives the same error. Could it be because the MC700A commander has not been updated to run on win7 or x64?

Well I presume you are able to start the commander, correct? It needs to be be running before you start ACQ4.

In any case, we have not had problems with 64-bit Win7. The system I have in mind uses a 700B, though. I wonder if there are driver differences there.. Did you install the latest 700B commander from MolecularDevices (if I remember correctly, it works just fine with the 700A)?
 
 
If need be, I might be able to install a 32 bit version of windows, as this PC has been freshly formatted anyway. Do you think that might help, or could there be less drastic measures to try first?

I don't think that is necessary. Let's see whether we can work this out without reinstalling.


Luke

Iris Oren

unread,
Feb 17, 2014, 6:56:23 AM2/17/14
to ac...@googlegroups.com



Well I presume you are able to start the commander, correct? It needs to be be running before you start ACQ4.

Yes, the MC 700A commander is running and operational when I start ACQ4 
 
In any case, we have not had problems with 64-bit Win7. The system I have in mind uses a 700B, though. I wonder if there are driver differences there.. Did you install the latest 700B commander from MolecularDevices (if I remember correctly, it works just fine with the 700A)?
It is the 700A commander with 700A amplifier (for which there are no updates for WIn 7 or x64). I just tried to install the 700B commander, but unfortunately, it does not seem to talk to the 700A amplifier and does not detect the amp when I scan for devices. So as far as I can see, the two are not compatible. However, I have written to Molecular Devices to find out if there is any way around this. Will let you know what they say.
 
If you can think of anything else in the meantime. please do let me know.
 
Thanks again for taking the time to think about this 
All the best
Iris

Luke Campagnola

unread,
Feb 17, 2014, 7:48:42 AM2/17/14
to acq4
On Mon, Feb 17, 2014 at 6:56 AM, Iris Oren <iris...@gmail.com> wrote:
 
In any case, we have not had problems with 64-bit Win7. The system I have in mind uses a 700B, though. I wonder if there are driver differences there.. Did you install the latest 700B commander from MolecularDevices (if I remember correctly, it works just fine with the 700A)?
It is the 700A commander with 700A amplifier (for which there are no updates for WIn 7 or x64). I just tried to install the 700B commander, but unfortunately, it does not seem to talk to the 700A amplifier and does not detect the amp when I scan for devices. So as far as I can see, the two are not compatible. However, I have written to Molecular Devices to find out if there is any way around this. Will let you know what they say.

Thanks for trying this!
 
 
If you can think of anything else in the meantime. please do let me know.


Many places we could go from here..

First, it would be nice to know whether your 'AxMultiClampMsg.dll' is a 32- or 64-bit DLL. There are a variety of methods for determining this here: http://stackoverflow.com/questions/495244/how-can-i-test-a-windows-dll-to-determine-if-it-is-32bit-or-64bit

If it is 32-bit, then it's likely you will need a 32-bit python to load the DLL (you can make another python installation in a different directory; no need to uninstall anything). 

To simplify testing, you could write a short python script:

    import os, ctypes
    dll = "C:\\path\\to\\AxMultiClampMsg.dll"     # note the use of double-backslashes to separate directory names
    assert os.path.isfile(dll)     # because we can get the same error just by trying to load a non-existent file
    ctypes.windll.LoadLibrary(dll)


Other options might be to experiment with XP compatibility mode or see if the compatibility troubleshooter has anything useful to say: http://windows.microsoft.com/en-us/windows7/open-the-program-compatibility-troubleshooter

Iris Oren

unread,
Feb 17, 2014, 8:43:46 AM2/17/14
to ac...@googlegroups.com
Hi Luke,
 
A strange thing: I am trying to install the 32bit version of python, but numpy-MKL 1.7 does not seem to be available for download any longer via the windows binary extensions for python extension packages site (I downloaded numpy-MKL-1.7.2-amd64-py2.7 last week) . I can only find version MKL-1.8 via the link. Should I download this instead? Version 1.7.0 seems to be available via sourceforge.net (http://sourceforge.net/projects/numpy/files/NumPy/1.7.0/).
 
Thanks
Iris

Luke Campagnola

unread,
Feb 17, 2014, 8:49:52 AM2/17/14
to acq4
On Mon, Feb 17, 2014 at 8:43 AM, Iris Oren <iris...@gmail.com> wrote:
Hi Luke,
 
A strange thing: I am trying to install the 32bit version of python, but numpy-MKL 1.7 does not seem to be available for download any longer via the windows binary extensions for python extension packages site (I downloaded numpy-MKL-1.7.2-amd64-py2.7 last week) . I can only find version MKL-1.8 via the link. Should I download this instead? Version 1.7.0 seems to be available via sourceforge.net (http://sourceforge.net/projects/numpy/files/NumPy/1.7.0/).

1.8 should be just fine. I haven't tested it yet, but to my knowledge there are no major differences.
 

Iris Oren

unread,
Feb 17, 2014, 12:29:16 PM2/17/14
to ac...@googlegroups.com
Hi Luke,
Good news: I installed 32-bit python, and the 700A is now being detected. Thank you so much!!
 
I am playing around with it now, and will let you know if I run into problems (but will start a different thread)
 
Take care,
Iris

Luke Campagnola

unread,
Feb 17, 2014, 1:26:35 PM2/17/14
to acq4
On Mon, Feb 17, 2014 at 12:29 PM, Iris Oren <iris...@gmail.com> wrote:
Hi Luke,
Good news: I installed 32-bit python, and the 700A is now being detected. Thank you so much!!
 
I am playing around with it now, and will let you know if I run into problems (but will start a different thread)


Enjoy!
We are still expanding the documentation; let me know if there is anything you'd like added (particularly tutorials).

Luke
 

Antonin Blot

unread,
Apr 22, 2014, 6:14:52 AM4/22/14
to ac...@googlegroups.com
Hi,

I had the same problem with a multiclamp 700B. Switching to 32bit python also solved it. If your changing the documentation, It might be worth adding a small warning on the "Installation" page.

Thanks

Antonin

Luke Campagnola

unread,
Apr 25, 2014, 3:43:44 PM4/25/14
to acq4
On Tue, Apr 22, 2014 at 6:14 AM, Antonin Blot <antoni...@gmail.com> wrote:
I had the same problem with a multiclamp 700B. Switching to 32bit python also solved it. If your changing the documentation, It might be worth adding a small warning on the "Installation" page.

Done. Thanks! 

Luke Campagnola

unread,
Sep 3, 2015, 4:37:12 PM9/3/15
to acq4
Update:  ACQ4 is now able to spawn a separate process for handling the MultiClamp communication. This makes it possible to run ACQ4 in a 64-bit Python with access to the MultiClamp. 

All you need are: 

* 32-bit and 64-bit python installations (with all the dependencies--numpy, scipy, pyparsing, etc.--satisfied for both installations)
* add `pythonExecutable="C:\\path\\to\\python32\\python.exe"` to the device config for each MultiClamp device.
 
Reply all
Reply to author
Forward
Message has been deleted
0 new messages