Skip to content

Fix AttributeError: 'Project' object has no attribute 'datafile_controller'#3012

Merged
HelioGuilherme66 merged 1 commit intorobotframework:developfrom
chelslava:fix-issue-2989-datafile-controller
Mar 28, 2026
Merged

Fix AttributeError: 'Project' object has no attribute 'datafile_controller'#3012
HelioGuilherme66 merged 1 commit intorobotframework:developfrom
chelslava:fix-issue-2989-datafile-controller

Conversation

@chelslava
Copy link
Copy Markdown

Summary

  • Fixes crash when using Library Finder on a clean install without an open project
  • Adds datafile_controller property to Project class
  • Adds null checks in _ImportSuggester to handle when datafile_controller is None

Problem

When RIDE is started fresh (clean install) without an open project, calling Tools -> Library Finder... crashes with:

AttributeError: 'Project' object has no attribute 'datafile_controller'

Root Cause

_ImportSuggester.__init__() calls controller.datafile_controller, but Project class didn't have this property. The datafile_controller attribute only existed on _DataController subclasses.

Solution

  1. Added datafile_controller property to Project class that returns self.controller (which may be None)
  2. Added null checks in _ImportSuggester.get_suggestions() and get_already_imported() to gracefully handle the case when no project is open

Testing

  • Manually tested the scenario described in the issue
  • Library Finder dialog now opens without crashing on a clean install

Closes #2989

…oller'

- Add datafile_controller property to Project class that returns self.controller
- Add null checks in _ImportSuggester to handle when datafile_controller is None

This fixes the crash when using Library Finder on a clean install without an open project.

Closes robotframework#2989
@HelioGuilherme66 HelioGuilherme66 added this to the v2.3 milestone Mar 28, 2026
@HelioGuilherme66 HelioGuilherme66 added the enhancement Request for improvement: either for an existing feature or a new one label Mar 28, 2026
@HelioGuilherme66 HelioGuilherme66 merged commit eedf25c into robotframework:develop Mar 28, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Request for improvement: either for an existing feature or a new one

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants