Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some bug fixes for keyboard handling in Builder #1245

Merged
merged 8 commits into from Sep 28, 2016
Merged

Conversation

@peircej
Copy link
Member

@peircej peircej commented Sep 21, 2016

No description provided.

peircej added 6 commits Sep 5, 2016
seems to be to do with import order of submodules (gui needs to be
first for some reason)
Refactoring in 1.84.0 caused error in string creation due to
unmatched number of string format arguments. Fixed by using new-style
string formatting where we can repeatedly call entry {0}
@coveralls
Copy link

@coveralls coveralls commented Sep 21, 2016

Coverage Status

Coverage increased (+0.001%) to 50.084% when pulling 43f6477 on peircej:master into 057736c on psychopy:master.

@codecov-io
Copy link

@codecov-io codecov-io commented Sep 21, 2016

Current coverage is 45.89% (diff: 66.66%)

Merging #1245 into master will increase coverage by <.01%

@@             master      #1245   diff @@
==========================================
  Files           232        232          
  Lines         36809      36812     +3   
  Methods           0          0          
  Messages          0          0          
  Branches       5668       5668          
==========================================
+ Hits          16891      16895     +4   
+ Misses        18373      18372     -1   
  Partials       1545       1545          

Powered by Codecov. Last update 057736c...4fc9ae6

peircej added 2 commits Sep 28, 2016
Fixes the error:

Traceback (most recent call last):
  File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/app/builder/builder.py", line 1903, in runFile
    script = self.generateScript(self.exp.expPath)
  File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/app/builder/builder.py", line 2091, in generateScript
    target=target)
  File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/app/builder/experiment.py", line 206, in writeScript
    self.flow.writeBody(script)
  File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/app/builder/experiment.py", line 1472, in writeBody
    entry.writeMainCode(script)
  File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/app/builder/experiment.py", line 1665, in writeMainCode
    event.writeFrameCode(buff)
  File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/app/builder/components/static/__init__.py", line 93, in writeFrameCode
    self.writeStopTestCode(buff)
  File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/app/builder/components/static/__init__.py", line 123, in writeStopTestCode
    self.writeParamUpdates(buff)
  File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/app/builder/components/static/__init__.py", line 154, in writeParamUpdates
    buff.writeIndented(code % self.params['name'])
TypeError: not all arguments converted during string formatting
The name wasn't being changed in the saved file. The problem was that (for
old compatibility reasons) the name is stored in two places for a Routine
and only one of these was being changed. Routine.name is now a property
that automatically updates Routine.params['name'] when it gets set (but
the reverse is not true)
@coveralls
Copy link

@coveralls coveralls commented Sep 28, 2016

Coverage Status

Coverage increased (+0.007%) to 50.09% when pulling 4fc9ae6 on peircej:master into 057736c on psychopy:master.

@peircej peircej merged commit 2156a17 into psychopy:master Sep 28, 2016
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants