Fix AttributeError when using Viewer, Parameterized, or arbitrary objects as node views#30
Merged
philippjfr merged 6 commits intomainfrom Feb 11, 2026
Merged
Conversation
Contributor
Co-authored-by: MarcSkovMadsen <42288570+MarcSkovMadsen@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix AttributeError in MyViewer component
Fix AttributeError when using Viewer or Parameterized objects as node views
Feb 8, 2026
Co-authored-by: MarcSkovMadsen <42288570+MarcSkovMadsen@users.noreply.github.com>
Co-authored-by: MarcSkovMadsen <42288570+MarcSkovMadsen@users.noreply.github.com>
Contributor
Author
Copilot
AI
changed the title
Fix AttributeError when using Viewer or Parameterized objects as node views
Fix AttributeError when using Viewer, Parameterized, or arbitrary objects as node views
Feb 8, 2026
MarcSkovMadsen
requested changes
Feb 9, 2026
Contributor
MarcSkovMadsen
left a comment
There was a problem hiding this comment.
Please merge with updated main and fix any issues. Including docstring issues as docstrings have been significantly improved.
Contributor
Author
Merged with updated main branch successfully. All tests pass (30 passed, 2 skipped). The fix remains intact after merge with comprehensive numpy-style docstrings from main. See merge commit 1cb514f. |
MarcSkovMadsen
requested changes
Feb 9, 2026
Contributor
MarcSkovMadsen
left a comment
There was a problem hiding this comment.
Please fix pre-commit issues
Co-authored-by: MarcSkovMadsen <42288570+MarcSkovMadsen@users.noreply.github.com>
Contributor
Author
Pre-commit issues fixed. Applied ruff formatting and resolved unused variable warnings. All pre-commit checks now pass. See commit 5004f21. |
MarcSkovMadsen
approved these changes
Feb 9, 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.
_resolve_editor_viewfor views in_get_childrenmethodSummary
Fixed the issue where
pn.viewable.Viewerobjects,param.Parameterizedobjects, and arbitrary objects like HoloViews plots would raiseAttributeError: 'MyViewer' object has no attribute '_models'when used as node views.Successfully merged with main branch and resolved all pre-commit issues.
Changes Made
/src/panel_reactflow/base.py: Changed line 1319 to apply_resolve_editor_view()to views, ensuring objects with__panel__()methods are properly resolved, and other objects are converted viapn.panel()/tests/test_api.py:test_reactflow_add_node_with_viewer()- validates Viewer objects work correctlytest_reactflow_add_node_with_arbitrary_object()- validates arbitrary objects (e.g., HoloViews) work correctly (issue Cannot use arbitrary python objects as view #13)Issues Fixed
Security Summary
No security vulnerabilities found or introduced.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.