Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] owpredictions: Fix a type error in report when using NoopDelegate #6537

Merged

Conversation

ales-erjavec
Copy link
Contributor

Issue

Fix an error when reporting regression model with data that does not have the target column:

-------------------------- AttributeError Exception ---------------------------
Traceback (most recent call last):
  File "/home/ales/devel/orange-widget-base/orangewidget/report/report.py", line 59, in show_report
    self.create_report_html()
  File "/home/ales/devel/orange-widget-base/orangewidget/report/report.py", line 98, in create_report_html
    self.send_report()
  File "/home/ales/devel/orange3/Orange/widgets/evaluate/owpredictions.py", line 930, in send_report
    self.report_table("Data & Predictions", merge_data_with_predictions(),
  File "/home/ales/devel/orange-widget-base/orangewidget/report/report.py", line 340, in report_table
    body = report_list(table, header_rows, header_columns)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ales/devel/orange-widget-base/orangewidget/report/report.py", line 324, in report_list
    return join("  <tr>\n    {}</tr>\n".format(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ales/devel/orange-widget-base/orangewidget/report/report.py", line 324, in <genexpr>
    return join("  <tr>\n    {}</tr>\n".format(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ales/devel/orange3/Orange/widgets/evaluate/owpredictions.py", line 907, in merge_data_with_predictions
    [delegate.displayText(
  File "/home/ales/devel/orange3/Orange/widgets/evaluate/owpredictions.py", line 907, in <listcomp>
    [delegate.displayText(
     ^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoopItemDelegate' object has no attribute 'displayText'
-------------------------------------------------------------------------------
Description of changes

Fix type of NoopDelegate

Includes
  • Code changes
  • Tests
  • Documentation

@codecov
Copy link

codecov bot commented Aug 17, 2023

Codecov Report

Merging #6537 (cd67c66) into master (49dc3fd) will decrease coverage by 0.01%.
Report is 12 commits behind head on master.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6537      +/-   ##
==========================================
- Coverage   87.68%   87.68%   -0.01%     
==========================================
  Files         321      321              
  Lines       69371    69404      +33     
==========================================
+ Hits        60830    60857      +27     
- Misses       8541     8547       +6     

@janezd janezd merged commit c54cfcb into biolab:master Aug 17, 2023
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.

2 participants