Created
December 15, 2015 00:03
-
-
Save drammock/ff6d0b6a262307d7841f to your computer and use it in GitHub Desktop.
attempts to connect to TDT in PBB226
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import expyfun as ef | |
import tdt | |
circuit = 'C:\\Users\\labuser\\Builds\\expyfun\\expyfun\\data\\expCircuitF32_RM1.rcx' | |
interface = 'USB' | |
model = 'RP2' | |
# approach #1 | |
ec = ef.ExperimentController(exp_name='foo', participant='foo', session='foo', | |
full_screen=False, output_dir=None, version='dev') | |
# approach #2 | |
rpcox = tdt.DSPCircuit(circuit, 'RP2', interface=interface) | |
rpcox.start() | |
# approach #3 | |
rpcox = tdt.actxobjects.RPcoX() | |
connex = rpcox.ConnectRM1(IntName=interface, DevNum=1) | |
# approach #4 | |
rpcox = tdt.util.connect_rpcox(name=model, interface=interface, | |
device_id=1, address=None) | |
''' | |
RESULTS ARE THE SAME FOR ALL FOUR ATTEMPTS: | |
Traceback (most recent call last): | |
File "C:\Users\labuser\Miniconda2\lib\site-packages\tdt\util.py", line 116, in connect_rpcox | |
driver = actxobjects.RPcoX() | |
File "C:\Users\labuser\Miniconda2\lib\site-packages\win32com\client\__init__.py", line 498, in __init__ | |
if oobj is None: oobj = pythoncom.new(self.CLSID) | |
pywintypes.com_error: (-2147221164, 'Class not registered', None, None | |
''' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment