Fix AttributeError: 'Project' object has no attribute 'datafile_controller'#3012
Merged
HelioGuilherme66 merged 1 commit intorobotframework:developfrom Mar 28, 2026
Conversation
…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
approved these changes
Mar 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
datafile_controllerproperty toProjectclass_ImportSuggesterto handle whendatafile_controllerisNoneProblem
When RIDE is started fresh (clean install) without an open project, calling
Tools -> Library Finder...crashes with:Root Cause
_ImportSuggester.__init__()callscontroller.datafile_controller, butProjectclass didn't have this property. Thedatafile_controllerattribute only existed on_DataControllersubclasses.Solution
datafile_controllerproperty toProjectclass that returnsself.controller(which may beNone)_ImportSuggester.get_suggestions()andget_already_imported()to gracefully handle the case when no project is openTesting
Closes #2989