Thaiz / psychopy

Automatically exported from code.google.com/p/psychopy
0 stars 0 forks source link

problem with running executables compiled with py2exe #62

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

Executables compiled with py2exe throw out the following errors when executed:

Traceback (most recent call last):
  File "test.py", line 1, in <module>
  File "psychopy\visual.pyc", line 22, in <module>
  File "psychopy\preferences\preferences.pyc", line 26, in __init__
  File "psychopy\preferences\preferences.pyc", line 72, in loadAll
  File "psychopy\preferences\configobj.pyc", line 583, in __getitem__
KeyError: 'general'

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

I am using python 2.6.4 (Enthought version), with psychopy 1.62.00, and py2exe 
0.6.9. The codes were compiled on a win7 platform. 

Please provide any additional information below.
My codes are as the following:

'''
from psychopy import visual, core

myWin = visual.Window((1024,768), allowGUI=True,
    rgb=(-1,-1,-1), fullscr = False)

ready = visual.TextStim(myWin, 
     text='test',  
     pos=[-0.1, 0.0], color=(1.0, 1.0, 1.0), rgb=None,
     colorSpace='rgb', opacity=1.0,height=0.15)
ready.draw()
myWin.flip()
core.wait(3)
myWin.close()
'''
I compiled it with the following setup.py

'''
from distutils.core import setup
import py2exe
from glob import glob
from sys import platform

import psychopy
thisVersion=psychopy.__version__

data_files = [("Microsoft.VC90.CRT", glob(r'd:\Expts\SR_flanker\*.*'))]
setup(
    data_files=data_files,
    console=['test.py']
  )
'''

It was compiled successfully. Messages appeared during the compiling process 
are shown in the attached message.txt. 

Original issue reported on code.google.com by audach...@gmail.com on 20 Sep 2010 at 11:17

Attachments:

GoogleCodeExporter commented 8 years ago
This is not an issue with PsychoPy per se, but with writing the setup.py for 
the py2exe script. There are several sets of files that would need to be 
imported (e.g prefs files) that are not normally found by py2exe.

Maybe a How-to page would be worth adding, if someone figures out all the steps 
needed to make it work.

Original comment by jon.pei...@gmail.com on 22 Sep 2010 at 11:39

GoogleCodeExporter commented 8 years ago
issues are now on github.com instead of googlecode

Original comment by jon.pei...@gmail.com on 27 Jul 2011 at 1:24

GoogleCodeExporter commented 8 years ago

Original comment by jon.pei...@gmail.com on 27 Jul 2011 at 1:25