internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: plotly/plotly.py

Issue:
graphs from plotly >= 5.8 don't render in databricks
displaying a python figure in an iframe within databricks works with plotly==5.7 but when I attempt to do it using 5.8 it fails with `Uncaught SyntaxError: Unexpected token '&&'`:

![Screenshot from 2022-06-02 10-56-02](https://user-images.githubusercontent.com/41019918/171659221-e7f7e274-c6bd-4822-8a66-1ac4825fa236.png)



Discussion:
**How to fix:**
1. by plotly: publish a new plotly version on Pypi that fixes this error
2. by users:
Until the fix is released by plotly on pypi, users can self-fix via adding the following code to their python scripts or notebooks:
```python
import plotly.io._html as piohtml
piohtml._mathjax_config = """<script type="text/javascript">if (window.MathJax && window.MathJax.Hub && window.MathJax.Hub.Config) {window.MathJax.Hub.Config({SVG: {font: "STIX-Web"}});}</script>"""
```

**Background:**
This error affects Databricks notebooks with plotly==5.8.0 (and potentially other environments that use a Plotly HTML renderer)
I stumbled across this as part of my work for Databricks.

The root cause of the error is in https://github.com/plotly/plotly.py/blob/HEAD/packages/python/plotly/plotly/io/_html.py#L23

There is a duplicate, consequent `&&`

The line should say:
```if (window.MathJax && window.MathJax.Hub && window.MathJax.Hub.Config) {window.MathJax.Hub.Config({SVG: {font: "STIX-Web"}});}\```



Thanks @fwetdb! I'm embarrassed that that got through code review 🙈 
You're welcome! I am glad that I could help! Without plotly being so widely used and open-source at the same time, this fix (including the investigation) would have been neither needed nor possible.

What are your thoughts on the timeline when the fix can be released, @nicolaskruchten ?
Should I open a PR or will you do it internally?
No need for a PR, I can do it. I will try to do a point release tonight or tomorrow morning.
Awesome, thank you for the fast reaction!
There is a stackoverflow question that relates to this. I wanted to comment but I do not have enough reputation for that. Also, I was not able to answer.

Can someone refer them to this issue?
https://stackoverflow.com/questions/72466969/plotly-uncaught-syntaxerror-unexpected-token

Resolving patch:
diff --git a/packages/python/plotly/plotly/io/_html.py b/packages/python/plotly/plotly/io/_html.py
--- a/packages/python/plotly/plotly/io/_html.py
+++ b/packages/python/plotly/plotly/io/_html.py
@@ -20,7 +20,7 @@
 
 _mathjax_config = """\
 <script type="text/javascript">\
-if (window.MathJax && window.MathJax.Hub && && window.MathJax.Hub.Config) {window.MathJax.Hub.Config({SVG: {font: "STIX-Web"}});}\
+if (window.MathJax && window.MathJax.Hub && window.MathJax.Hub.Config) {window.MathJax.Hub.Config({SVG: {font: "STIX-Web"}});}\
 </script>"""
 
 


Test patch:
Repository: plotly/plotly.py

Issue:
write_html fails with latest plotly.min.js version 2.17.1
The latest plotly.min.js version 2.17.1 contains special characters which are not supported by the Windows cp1252 default codec.
E.g. `\u25c4` (https://www.fileformat.info/info/unicode/char/25c4/index.htm).

Reproducible example (Win 10, 64bit, **plotly 5.12**):

```
import plotly
print(plotly.__version__)

import plotly.express as px

fig =px.scatter(x=range(10), y=range(10))
fig.write_html("file.html", include_plotlyjs="directory")
```

This produces following error:
```
Traceback (most recent call last):
  File "C:\Users\...\scratches\scratch_2.py", line 7, in <module>
    fig.write_html("file.html", include_plotlyjs="directory")
  File "C:\git\...\.tox\codecov\lib\site-packages\plotly\basedatatypes.py", line 3700, in write_html
    return pio.write_html(self, *args, **kwargs)
  File "C:\git\...\.tox\codecov\lib\site-packages\plotly\io\_html.py", line 545, in write_html
    bundle_path.write_text(get_plotlyjs())
  File "C:\Python39\lib\pathlib.py", line 1286, in write_text
    return f.write(data)
  File "C:\Python39\lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u25c4' in position 276182: character maps to <undefined>
```



Discussion:

Resolving patch:
diff --git a/packages/python/plotly/plotly/io/_html.py b/packages/python/plotly/plotly/io/_html.py
--- a/packages/python/plotly/plotly/io/_html.py
+++ b/packages/python/plotly/plotly/io/_html.py
@@ -542,7 +542,7 @@ def write_html(
         bundle_path = path.parent / "plotly.min.js"
 
         if not bundle_path.exists():
-            bundle_path.write_text(get_plotlyjs())
+            bundle_path.write_text(get_plotlyjs(), encoding="utf-8")
 
     # Handle auto_open
     if path is not None and full_html and auto_open:


Test patch:
Repository: plotly/plotly.py

Issue:
plot empty dataframe fails if facet_col/row is specified
In most cases plotting with an empty data_frame works nicely, I mean, it shows a figure with no traces but with the good layout.
But if we specify a `facet_col` or `facet_row` it fails.

```python
import plotly.express as px
import pandas as pd
px.bar(
    pd.DataFrame(columns=['A', 'B', 'X']),
    x = 'A',
    y = 'X',
    facet_col = 'B'
)
```
I would expect the same result as if `facet_col` was None. As it is already the case for `animation_frame`


Discussion:

Resolving patch:
diff --git a/packages/python/plotly/plotly/express/_core.py b/packages/python/plotly/plotly/express/_core.py
--- a/packages/python/plotly/plotly/express/_core.py
+++ b/packages/python/plotly/plotly/express/_core.py
@@ -1880,6 +1880,10 @@ def infer_config(args, constructor, trace_patch, layout_patch):
         args[position] = args["marginal"]
         args[other_position] = None
 
+    # Ignore facet rows and columns when data frame is empty so as to prevent nrows/ncols equaling 0
+    if len(args["data_frame"]) == 0:
+        args["facet_row"] = args["facet_col"] = None
+
     # If both marginals and faceting are specified, faceting wins
     if args.get("facet_col") is not None and args.get("marginal_y") is not None:
         args["marginal_y"] = None


Test patch:
diff --git a/test/percy/plotly-express.py b/test/percy/plotly-express.py
--- a/test/percy/plotly-express.py
+++ b/test/percy/plotly-express.py
@@ -543,3 +543,6 @@
 )
 fig = px.timeline(df, x_start="Start", x_end="Finish", y="Task", color="Task")
 fig.write_html(os.path.join(dir_name, "timeline.html"), auto_play=False)
+
+
+px.bar(pd.DataFrame(columns=["A", "B", "X"]), x="A", y="X", facet_col="B")
Repository: plotly/plotly.py

Issue:
add `packaging` to setup.py file?
After installing plotly==5.13.1, `import plotly.io` failed with the below error due to `packaging` not being installed in my python 3.6 env by default:

```
      import plotly.io as pio
    File "/app/.heroku/python/lib/python3.6/site-packages/plotly/__init__.py", line 35, in <module>
      from plotly import (
    File "/app/.heroku/python/lib/python3.6/site-packages/plotly/io/__init__.py", line 12, in <module>
      from ._renderers import renderers, show
    File "/app/.heroku/python/lib/python3.6/site-packages/plotly/io/_renderers.py", line 7, in <module>
      from packaging.version import Version
ModuleNotFoundError: No module named 'packaging'```



Discussion:
I can confirm.
Ah, this is unfortunate, sorry about this, we'll fix this in the next patch in a day or two.

Resolving patch:
diff --git a/packages/python/plotly/setup.py b/packages/python/plotly/setup.py
--- a/packages/python/plotly/setup.py
+++ b/packages/python/plotly/setup.py
@@ -556,7 +556,7 @@ def run(self):
     data_files=[
         ("etc/jupyter/nbconfig/notebook.d", ["jupyterlab-plotly.json"]),
     ],
-    install_requires=["tenacity>=6.2.0"],
+    install_requires=["tenacity>=6.2.0", "packaging"],
     zip_safe=False,
     cmdclass=dict(
         build_py=js_prerelease(versioneer_cmds["build_py"]),


Test patch:
Repository: plotly/plotly.py

Issue:
Plotly Express error with subset categorical pandas column 
Plotly Express gives a KeyError when using a subselection of a dataframe with a categorical column. The categorical column is useful for custom ordering of values, but sometimes you only want to plot a subset of that dataframe. When not all the values of the Categorical column are present in the subselection, Plotly Express gives an error:

```python
df = pd.DataFrame({
    "x": [0, 0, 1, 0, 1],
    "Value": [10, 5, 7, 3, 8],
    "Category": pd.Categorical(["one", "two", "one", "three", "three"], categories=["one", "two", "three"], ordered=True)
})

px.scatter(
    df[df["Category"].isin(["one", "three"])],  # Works fine with just `df` here
    x="x",
    y="Value",
    color="Category"
)
```


Discussion:

Resolving patch:
diff --git a/packages/python/plotly/plotly/express/_core.py b/packages/python/plotly/plotly/express/_core.py
--- a/packages/python/plotly/plotly/express/_core.py
+++ b/packages/python/plotly/plotly/express/_core.py
@@ -2042,7 +2042,9 @@ def get_groups_and_orders(args, grouper):
         groups = {tuple(single_group_name): df}
     else:
         required_grouper = [g for g in grouper if g != one_group]
-        grouped = df.groupby(required_grouper, sort=False)  # skip one_group groupers
+        grouped = df.groupby(
+            required_grouper, sort=False, observed=True
+        )  # skip one_group groupers
         group_indices = grouped.indices
         sorted_group_names = [
             g if len(required_grouper) != 1 else (g,) for g in group_indices


Test patch:
diff --git a/packages/python/plotly/plotly/tests/test_optional/test_px/test_colors.py b/packages/python/plotly/plotly/tests/test_optional/test_px/test_colors.py
--- a/packages/python/plotly/plotly/tests/test_optional/test_px/test_colors.py
+++ b/packages/python/plotly/plotly/tests/test_optional/test_px/test_colors.py
@@ -53,3 +53,11 @@ def test_r_colorscales():
                 assert scale.replace("_r", "") in scale_names
             else:
                 assert scale + "_r" in scale_names
+
+
+def test_color_categorical_dtype():
+    df = px.data.tips()
+    df["day"] = df["day"].astype("category")
+    px.scatter(
+        df[df.day != df.day.cat.categories[0]], x="total_bill", y="tip", color="day"
+    )
Repository: mne-tools/mne-bids-pipeline

Issue:
update get_values_for_key -> get_entity_vals


> can you update this in mne-study-template? :) don't forget about it ;-)

_Originally posted by @jasmainak in https://github.com/mne-tools/mne-bids/pull/260#issuecomment-522692082_


Discussion:

Resolving patch:
diff --git a/config.py b/config.py
--- a/config.py
+++ b/config.py
@@ -9,7 +9,7 @@
 from collections import defaultdict
 
 import numpy as np
-from mne_bids.utils import get_values_for_key, get_kinds
+from mne_bids.utils import get_entity_vals, get_kinds
 
 # Name, version, and hosting location of the pipeline
 PIPELINE_NAME = 'mne-study-template'
@@ -47,13 +47,13 @@
 # BIDS params
 # see: bids-specification.rtfd.io/en/latest/99-appendices/04-entity-table.html
 
-sessions = get_values_for_key(bids_root, key='ses')
+sessions = get_entity_vals(bids_root, entity_key='ses')
 sessions = sessions if sessions else [None]
 
 # XXX: take only first task for now
-task = get_values_for_key(bids_root, key='task')[0]
+task = get_entity_vals(bids_root, entity_key='task')[0]
 
-runs = get_values_for_key(bids_root, key='run')
+runs = get_entity_vals(bids_root, entity_key='run')
 runs = runs if runs else [None]
 
 acq = None
@@ -86,7 +86,7 @@
 
 # subjects_list = ['05', '06', '07']
 
-subjects_list = get_values_for_key(bids_root, key='sub')
+subjects_list = get_entity_vals(bids_root, entity_key='sub')
 
 # subjects_list = ['05']
 


Test patch:
Repository: mne-tools/mne-bids-pipeline

Issue:
config.trigger_time_shift is currently unused
And also lacks clarification of what exactly it is supposed to do.


Discussion:
I think it's irrelevant now that we switched to BIDS. BIDS should be
correct to avoid using this

very good point. I will remove this then.

Resolving patch:
diff --git a/config.py b/config.py
--- a/config.py
+++ b/config.py
@@ -461,17 +461,6 @@
 
 tmax = 0.5
 
-# ``trigger_time_shift`` : float | None
-#    If float it specifies the offset for the trigger and the stimulus
-#    (in seconds). You need to measure this value for your specific
-#    experiment/setup.
-#
-# Example
-# ~~~~~~~
-# >>> trigger_time_shift = 0  # don't apply any offset
-
-trigger_time_shift = 0.
-
 # ``baseline`` : tuple
 #    It specifies how to baseline the epochs; if None, no baseline is applied.
 #


Test patch:
Repository: mne-tools/mne-bids-pipeline

Issue:
Remove anonymization
As @jasmainak pointed out, anonymization should happen on the BIDS level, before the study template is run.


Discussion:

Resolving patch:
diff --git a/config.py b/config.py
--- a/config.py
+++ b/config.py
@@ -64,17 +64,6 @@
 $SUBJECTS_DIR used by the Freesurfer software.
 """
 
-daysback: Optional[int] = None
-"""
-warning:
-     This parameter will soon be removed!
-     Anonymization should be done on the BIDS dataset **before** running
-     the Study Template!
-
-If not ``None``, apply a time shift to dates to adjust for limitateions
-of FIFF files.
-"""
-
 interactive: bool = False
 """
 If True, the scripts will provide some interactive elements, such as
diff --git a/scripts/preprocessing/01-import_and_maxfilter.py b/scripts/preprocessing/01-import_and_maxfilter.py
--- a/scripts/preprocessing/01-import_and_maxfilter.py
+++ b/scripts/preprocessing/01-import_and_maxfilter.py
@@ -82,7 +82,7 @@ def rename_events(raw, subject, session):
                f'they are not present in the BIDS input data:\n'
                f'{", ".join(sorted(list(events_not_in_raw)))}')
         if config.on_rename_missing_events == 'warn':
-            logger.warn(msg)
+            logger.warning(msg)
         else:
             raise ValueError(msg)
 
@@ -211,9 +211,6 @@ def load_data(bids_path):
     raw = read_raw_bids(bids_path=bids_path,
                         extra_params=extra_params)
 
-    if config.daysback is not None:
-        raw.anonymize(daysback=config.daysback)
-
     if subject != 'emptyroom':
         # Crop the data.
         if config.crop is not None:
diff --git a/scripts/report/01-make_reports.py b/scripts/report/01-make_reports.py
--- a/scripts/report/01-make_reports.py
+++ b/scripts/report/01-make_reports.py
@@ -437,7 +437,7 @@ def add_event_counts(*,
         df_events = count_events(BIDSPath(root=config.bids_root,
                                           session=session))
     except ValueError:
-        logger.warn('Could not read events.')
+        logger.warning('Could not read events.')
         df_events = None
 
     if df_events is not None:


Test patch:
diff --git a/tests/configs/config_ds000246.py b/tests/configs/config_ds000246.py
--- a/tests/configs/config_ds000246.py
+++ b/tests/configs/config_ds000246.py
@@ -15,5 +15,4 @@
 conditions = ['standard', 'deviant', 'button']
 contrasts = [('deviant', 'standard')]
 decode = True
-daysback = -365 * 110
 on_error = 'debug'
Repository: mne-tools/mne-bids-pipeline

Issue:
most typing_extensions imports do not work
We need to import most types from `typing` instead, even on Python 3.6


Discussion:

Resolving patch:
diff --git a/config.py b/config.py
--- a/config.py
+++ b/config.py
@@ -11,12 +11,12 @@
 import sys
 import copy
 import logging
+
+from typing import Optional, Union, Iterable, List, Tuple, Dict, Callable
 if sys.version_info >= (3, 8):
-    from typing import (Optional, Union, Iterable, List, Tuple, Dict, Literal,
-                        Callable)
+    from typing import Literal
 else:
-    from typing_extensions import (Optional, Union, Iterable, List, Tuple,
-                                   Dict, Literal, Callable)
+    from typing_extensions import Literal
 
 import coloredlogs
 import numpy as np
diff --git a/run.py b/run.py
--- a/run.py
+++ b/run.py
@@ -1,17 +1,19 @@
 #!/usr/bin/env python
 
-import fire
 import os
+import sys
 import runpy
 import pathlib
 import logging
-import coloredlogs
 from typing import Union, Optional, Tuple
-try:
+if sys.version_info >= (3, 8):
     from typing import Literal
-except ImportError:  # Python <3.8
+else:
     from typing_extensions import Literal
 
+import fire
+import coloredlogs
+
 logger = logging.getLogger(__name__)
 coloredlogs.install(fmt='%(asctime)s %(levelname)s %(message)s', logger=logger)
 


Test patch:
diff --git a/tests/run_tests.py b/tests/run_tests.py
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -4,10 +4,11 @@
 from pathlib import Path
 import argparse
 import runpy
+from typing import Collection, Dict
 if sys.version_info >= (3, 8):
-    from typing import TypedDict, Collection, Dict
+    from typing import TypedDict
 else:
-    from typing_extensions import TypedDict, Collection, Dict
+    from typing_extensions import TypedDict
 
 
 # Add the pipelines dir to the PATH
Repository: mne-tools/mne-bids-pipeline

Issue:
ica_algorithm definition conflict
when setting ica_algorithm to 'extended_infomax':

line 811 of my config,
`ica_algorithm: Literal['picard', 'fastica', 'extended_infomax'] = 'extended_infomax'`

I get the following error:
```

  File "/network/lustre/iss01/cenir/analyse/meeg/LIBERATE/03_scripts/EEG_analysis/mne-study-template/scripts/preprocessing/04a-run_ica.py", line 96, in fit_ica
    max_iter=config.ica_max_iterations)
  File "<decorator-gen-419>", line 24, in __init__
  File "/network/lustre/iss01/cenir/analyse/meeg/00_max/share/mne-python/mne/preprocessing/ica.py", line 384, in __init__
    _check_option('method', method, _KNOWN_ICA_METHODS)
  File "/network/lustre/iss01/cenir/analyse/meeg/00_max/share/mne-python/mne/utils/check.py", line 617, in _check_option
    value=value, extra=extra))
ValueError: Invalid value for the 'method' parameter. Allowed values are 'fastica', 'infomax', and 'picard', but got 'extended_infomax' instead.
```

and when setting ica_algorithm to 'infomax':
line 811 of my config,
`ica_algorithm: Literal['picard', 'fastica', 'infomax'] = 'infomax'
`
 ```
File "/network/lustre/iss01/cenir/analyse/meeg/LIBERATE/03_scripts/EEG_analysis/mne-study-template/scripts/init/00-init_derivatives_dir.py", line 10, in <module>
    import config
  File "/network/lustre/iss01/cenir/analyse/meeg/LIBERATE/03_scripts/EEG_analysis/mne-study-template/config.py", line 1330, in <module>
    raise ValueError(msg)
ValueError: Invalid ICA algorithm requested. Valid values for ica_algorithm are: 'picard', 'fastica', and 'extended_infomax', but received infomax.
```



Discussion:
Thanks, that's a bug in the Pipeline not mapping `'extended_infomax'` to the correct MNE-Python parameters. Should be an easy fix.

Resolving patch:
diff --git a/scripts/preprocessing/04a-run_ica.py b/scripts/preprocessing/04a-run_ica.py
--- a/scripts/preprocessing/04a-run_ica.py
+++ b/scripts/preprocessing/04a-run_ica.py
@@ -84,14 +84,16 @@ def filter_for_ica(raw, subject, session):
 
 
 def fit_ica(epochs, subject, session):
-    if config.ica_algorithm == 'picard':
+    algorithm = config.ica_algorithm
+    fit_params = None
+
+    if algorithm == 'picard':
         fit_params = dict(fastica_it=5)
-    elif config.ica_algorithm == 'extended_infomax':
+    elif algorithm == 'extended_infomax':
+        algorithm = 'infomax'
         fit_params = dict(extended=True)
-    elif config.ica_algorithm == 'fastica':
-        fit_params = None
 
-    ica = ICA(method=config.ica_algorithm, random_state=config.random_state,
+    ica = ICA(method=algorithm, random_state=config.random_state,
               n_components=config.ica_n_components, fit_params=fit_params,
               max_iter=config.ica_max_iterations)
 


Test patch:
diff --git a/tests/configs/config_ds000248_ica.py b/tests/configs/config_ds000248_ica.py
--- a/tests/configs/config_ds000248_ica.py
+++ b/tests/configs/config_ds000248_ica.py
@@ -26,6 +26,7 @@
 
 use_ssp = False
 use_ica = True
+ica_algorithm = 'extended_infomax'
 ica_l_freq = 1.0
 ica_n_components = 0.8
 ica_max_iterations = 500
Repository: mne-tools/mne-bids-pipeline

Issue:
Issue when eog_channels = None
@dnacombo today ran into an issue related incorrect handling of an `eog_channels = None` setting in the configuration file. I don't remember the details; opening this issue so we don't forget about this.


Discussion:

Resolving patch:
diff --git a/scripts/preprocessing/01-import_and_maxfilter.py b/scripts/preprocessing/01-import_and_maxfilter.py
--- a/scripts/preprocessing/01-import_and_maxfilter.py
+++ b/scripts/preprocessing/01-import_and_maxfilter.py
@@ -267,8 +267,9 @@ def load_data(bids_path):
         # so one might get unexpected results otherwise, as the channel would
         # influence e.g. in GFP calculations, but not appear on topographic
         # maps.
-        if any([eog_ch_name in config.eeg_bipolar_channels
-                for eog_ch_name in config.eog_channels]):
+        if (config.eog_channels and
+                any([eog_ch_name in config.eeg_bipolar_channels
+                     for eog_ch_name in config.eog_channels])):
             msg = 'Setting channel type of new bipolar EOG channel(s) …'
             logger.info(gen_log_message(message=msg, step=1, subject=subject,
                                         session=session))


Test patch:
Repository: mne-tools/mne-bids-pipeline

Issue:
Warning when 0 EOG-related IC detected ?
During the preprocessing step of the pipeline, I obtained:

`12:09:41 [Step-04][sub-403] Performing automated EOG artifact detection …`
`12:09:41 [Step-04][sub-403] Detected 0 EOG-related ICs in 18 EOG epochs.`
`12:10:46 [Step-04][sub-403] Saving ICA solution and detected artifacts to disk.`

I think it would be great if a warning appeared saying:

"Warning: zero EOG-related IC was detected, the EOG epochs will not be corrected.
Checking that EOG epochs are not superposed with actual task epochs...
There are 3 superpositions between task epochs and OEG epochs. Marking those 3 task epochs as rejected."


Or maybe it could just say:
"Warning: zero EOG-related IC was detected, this is highly suspicious. A manual check is required." 

What do you think?


Discussion:
+1

PR welcome

>

+10 :)

PR would be awesome! I even think we can make use of different log levels – this one should be a warning, so it will be printed in red


Resolving patch:
diff --git a/scripts/preprocessing/04a-run_ica.py b/scripts/preprocessing/04a-run_ica.py
--- a/scripts/preprocessing/04a-run_ica.py
+++ b/scripts/preprocessing/04a-run_ica.py
@@ -139,6 +139,14 @@ def detect_ecg_artifacts(ica, raw, subject, session, report):
                f'{len(ecg_epochs)} ECG epochs.')
         logger.info(gen_log_message(message=msg, step=4, subject=subject,
                                     session=session))
+        if not ecg_inds:
+            warn = ('No ECG-related ICs detected, '
+                    'this is highly suspicious. '
+                    'A manual check is suggested. '
+                    'You can try to lower "ica_ctps_ecg_threshold".')
+            logger.warning(gen_log_message(message=warn, step=4,
+                                           subject=subject,
+                                           session=session))
         del ecg_epochs
 
         # Plot scores
@@ -203,6 +211,16 @@ def detect_eog_artifacts(ica, raw, subject, session, report):
                f'{len(eog_epochs)} EOG epochs.')
         logger.info(gen_log_message(message=msg, step=4, subject=subject,
                                     session=session))
+        if not eog_inds:
+            warn = ('No EOG-related ICs detected, '
+                    'this is highly suspicious. '
+                    'A manual check is suggested. '
+                    'You can either lower "ica_eog_threshold" or check '
+                    'that the blinks are between the tasks '
+                    'and not during the tasks.')
+            logger.warning(gen_log_message(message=warn, step=4,
+                                           subject=subject,
+                                           session=session))
         del eog_epochs
 
         # Plot scores


Test patch: