question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

report.add_figure bad tags error not specific enough

See original GitHub issue

Describe the bug

The report class complains about a bad tag but does not say what characters are bad. Furthermore, I think it should allow numeric characters. I get:

ValueError: The following tags contained invalid characters: 'Subject 2002'

Steps to reproduce

Just do:

import matplotlib.pyplot as plt
from mne.report import Report

rep = Report()
subject = '2002'
fig = plt.figure()
rep.add_figure(fig, title=f'Figure {i}', tags=(f'Subject {subject}',))

Expected results

Report is produced with tag “subject 2002”

Actual results

Numeric subjects are quite common and I’d imagine a common usecase would be to use numeric tags. I think they should work … did work previously in rep.add_figs_to_section, so I’d consider this a regression.

Additional information

I’m on latest master branch

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jasmainakcommented, Jan 3, 2022

no strong feelings about exposing auto_close. I think if MNE-report creates a figure, it should auto-close, but if user created the figure (as in add_figure), it should not close, by default.

0reactions
hoechenbergercommented, Jan 3, 2022

@jasmainak I think this makes sense, yes!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why Jsoup does not report error when it encounters missing ...
I understand that Jsoup behavior is to try to do the best by adding missing tag or removing existing tag. It ...
Read more >
Start Here - Bad Tags
Read through Bad Tag's most frequently asked questions about shipping, returns, customization & discount codes for our custom dog ID tags. Learn more...
Read more >
802.11 TGv TIM Broadcast comment resolutions - IEEE Mentor
110, 397, A_Thomson, 7.3.2.65, 41, 6, T, Y, The sentence states that the Diagnostics Token is set to a unique number for which...
Read more >
Referencing Pivot Table Ranges in VBA - Peltier Tech
This tutorial explains how to reference various parts of a pivot table using VBA code.
Read more >
From Information Management to Information Visualization
Among safety KPI metrics, “patient identification error rate, site identification error rate, side identification error rate, and specimen labeling error rate” ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found