| Reference | Downloads | Github

Strange error on code generated by Builder


I am writing my problem again with the results of experiments I did on the problem:

I have two identical new computers, on both of them I installed standalone PsychoPy 1.84.02. I am using Win 7 on both.
I have parallel ports on both computers where I tested them using another application (pushed data values and saw it in the oscilloscope I connected to them) and I saw that they both works.
I tried pushing data to the parallel ports using PsychoPy. In one of the computers it was OK. I saw in the oscilloscope the change. On the other computer I got strange error:

I generated the experiment using the builder (put in the address, the value - 255 and compiled to code)
the code generated was

p_port = parallel.ParallelPort(address=‘0xD020’)

When I ran it on the other computer I got this error:

pyo version 0.8.0 (uses single precision)
Traceback (most recent call last):
File “D:\MyExperiments\Noas\”, line 69, in
p_port = parallel.ParallelPort(address=‘0xD000’)
AttributeError: ‘module’ object has no attribute ‘ParallelPort’

I found in the manuals that ParallelPort is relatively new command and for backwards compatibility the command
setPortAddress is supposed to be the same. When I manually edited the code and replaced parallelPort with setPortAddress I didn’t get error for that line, but rather got error for the next command:

pyo version 0.8.0 (uses single precision)
Traceback (most recent call last):
File “D:\MyExperiments\Noas\”, line 96, in
if t >= 0.0 and p_port.status == NOT_STARTED:
AttributeError: ‘NoneType’ object has no attribute ‘status’

I don’t understand how there is code generated by the builder that is not running ?
How is it possible that the same version on the same type computers run differently?

What should I check in order to be able to run on the second computer ?

Thanks everyone in advance!



Some more update:

I did debugged the same code on both computers and indeed after importing the library, I saw that in the first computer it does not have the ParallelPort command. So I went into the file and found that it did not have either the inpout32 or dlportio. It is supposed to log a warning but it didn’t.
I downloaded inpout32.dll and put it in the same directory as my experiment and now it is working.
I wander if there is a way to put it some place else so that it will still work…