Skip to content

BF: Opening the same experiment in two Builder windows caused the prefs file to be saved wrong, leading to an error next time the app started#7045

Merged
TEParsons merged 1 commit intopsychopy:devfrom
TEParsons:dev-bf-pref-malform
Jan 10, 2025
Merged

Conversation

@TEParsons
Copy link
Copy Markdown
Contributor

It's a quirk of the contrib module which we save/load the prefs file using - it only seems to allow 1 level of nesting dicts, so doing self.appData['frames'][str(self.filename)] saved in the file as if it were self.appData[str(self.filename)]. If you had the same experiment open twice, the first one would be saved in the prefs file, then the file would be reloaded, then when the second one saved it wouldn't recognise that the same file is already present because it's looking 1 level down from where the prefs file maxed out.

In the long term I think we should do away with contrib in favour of Python builtin configparser, but adding this check fixes the immediate problem

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 50.59%. Comparing base (e7ffd6e) to head (f83b0a2).
Report is 3 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #7045   +/-   ##
=======================================
  Coverage   50.59%   50.59%           
=======================================
  Files         347      347           
  Lines       62873    62874    +1     
=======================================
+ Hits        31809    31814    +5     
+ Misses      31064    31060    -4     
Components Coverage Δ
app ∅ <ø> (∅)
boilerplate ∅ <ø> (∅)
library ∅ <ø> (∅)
vm-safe library ∅ <ø> (∅)

@TEParsons TEParsons merged commit 8aab1bf into psychopy:dev Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant