Skip to content

[Bug]: When there's an "untitled.psyexp" saved in the working directory, opening the Builder opens a file dialog instead of making a new "untitled.psyexp" #7349

@aforren1

Description

@aforren1

PsychoPy Version

2025.2.0 (release branch)

What OS are your PsychoPy running on?

Linux-based systems

Bug Description

When opening a "new" Builder window (e.g. with psychopy --builder or by clicking the "New: create new experiment file" button with a Builder window open) , I'm prompted to open an existing .psyexp file instead of getting a blank "untitled.psyexp". If I choose an existing .psyexp, that opens fine.

If I close/cancel opening an existing file at that point, I get the following exception:

Traceback (most recent call last):
  File "/home/bwadmin/psychopy/psychopy/app/_psychopyApp.py", line 862, in newBuilderFrame
    self.builder = BuilderFrame(None, -1,
                   ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bwadmin/psychopy/psychopy/app/builder/builder.py", line 215, in __init__
    self.updateReadme()  # check/create frame as needed
    ^^^^^^^^^^^^^^^^^^^
  File "/home/bwadmin/psychopy/psychopy/app/builder/builder.py", line 1009, in updateReadme
    self.readmeFrame.setFile(None)
  File "/home/bwadmin/psychopy/psychopy/app/builder/builder.py", line 3467, in setFile
    self.expName = self.parent.exp.getExpName()
                   ^^^^^^^^^^^^^^^
AttributeError: 'BuilderFrame' object has no attribute 'exp'

Expected Behaviour

I expect to get a blank "untitled.psyexp" by default?

Steps to Reproduce

  1. psychopy --builder
  2. Click cancel or X button

Additional context

I have 0fe2019 installed in a virtual environment with Python 3.11 on Debian 12 + X11 + Xfce. I've also tried deleting the ~/.psychopy3 folder, with no difference in behavior. I cannot reproduce on Windows with Py3.11 + the same commit.

Metadata

Metadata

Assignees

Labels

🐞 bugIssue describes a bug (crash or error) or undefined behavior.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions