bbci / wyrm

Python toolbox for Brain-Computer Interfacing (BCI)
MIT License
96 stars 37 forks source link

select_channels error #2

Open arellanon opened 4 years ago

arellanon commented 4 years ago

Hi! I run code python wyrm/test/test_select_channels.py and I get an error Thanks for everything.

nahuel@nahuel-Notebook:~/Documents/Tutoriales/wyrm/test$ python test_select_channels.py EEEE

ERROR: test_select_channels (main.TestSelectChannels) Selecting channels with an array of regexes.

Traceback (most recent call last): File "test_select_channels.py", line 22, in test_select_channels self.dat = select_channels(self.dat, ['ca.*', 'cc1']) File "/home/nahuel/.local/lib/python3.7/site-packages/wyrm/processing.py", line 455, in select_channels m = re.match(regexp, c, re.IGNORECASE | re.LOCALE) File "/usr/lib/python3.7/re.py", line 173, in match return _compile(pattern, flags).match(string) File "/usr/lib/python3.7/re.py", line 286, in _compile p = sre_compile.compile(pattern, flags) File "/usr/lib/python3.7/sre_compile.py", line 764, in compile p = sre_parse.parse(p, flags) File "/usr/lib/python3.7/sre_parse.py", line 934, in parse p.pattern.flags = fix_flags(str, p.pattern.flags) File "/usr/lib/python3.7/sre_parse.py", line 901, in fix_flags raise ValueError("cannot use LOCALE flag with a str pattern") ValueError: cannot use LOCALE flag with a str pattern

====================================================================== ERROR: test_select_channels_copy (main.TestSelectChannels) Select channels must not change the original parameter.

Traceback (most recent call last): File "test_select_channels.py", line 36, in test_select_channels_copy select_channels(self.dat, ['ca.*']) File "/home/nahuel/.local/lib/python3.7/site-packages/wyrm/processing.py", line 455, in select_channels m = re.match(regexp, c, re.IGNORECASE | re.LOCALE) File "/usr/lib/python3.7/re.py", line 173, in match return _compile(pattern, flags).match(string) File "/usr/lib/python3.7/re.py", line 286, in _compile p = sre_compile.compile(pattern, flags) File "/usr/lib/python3.7/sre_compile.py", line 764, in compile p = sre_parse.parse(p, flags) File "/usr/lib/python3.7/sre_parse.py", line 934, in parse p.pattern.flags = fix_flags(str, p.pattern.flags) File "/usr/lib/python3.7/sre_parse.py", line 901, in fix_flags raise ValueError("cannot use LOCALE flag with a str pattern") ValueError: cannot use LOCALE flag with a str pattern

====================================================================== ERROR: test_select_channels_inverse (main.TestSelectChannels) Removing channels with an array of regexes.

Traceback (most recent call last): File "test_select_channels.py", line 29, in test_select_channels_inverse self.dat = select_channels(self.dat, ['ca.*', 'cc1'], invert=True) File "/home/nahuel/.local/lib/python3.7/site-packages/wyrm/processing.py", line 455, in select_channels m = re.match(regexp, c, re.IGNORECASE | re.LOCALE) File "/usr/lib/python3.7/re.py", line 173, in match return _compile(pattern, flags).match(string) File "/usr/lib/python3.7/re.py", line 286, in _compile p = sre_compile.compile(pattern, flags) File "/usr/lib/python3.7/sre_compile.py", line 764, in compile p = sre_parse.parse(p, flags) File "/usr/lib/python3.7/sre_parse.py", line 934, in parse p.pattern.flags = fix_flags(str, p.pattern.flags) File "/usr/lib/python3.7/sre_parse.py", line 901, in fix_flags raise ValueError("cannot use LOCALE flag with a str pattern") ValueError: cannot use LOCALE flag with a str pattern

====================================================================== ERROR: test_select_channels_swapaxis (main.TestSelectChannels) Select channels works with non default chanaxis.

Traceback (most recent call last): File "test_select_channels.py", line 41, in test_select_channels_swapaxis dat1 = select_channels(swapaxes(self.dat, 0, 1), ['ca.*'], chanaxis=0) File "/home/nahuel/.local/lib/python3.7/site-packages/wyrm/processing.py", line 455, in select_channels m = re.match(regexp, c, re.IGNORECASE | re.LOCALE) File "/usr/lib/python3.7/re.py", line 173, in match return _compile(pattern, flags).match(string) File "/usr/lib/python3.7/re.py", line 286, in _compile p = sre_compile.compile(pattern, flags) File "/usr/lib/python3.7/sre_compile.py", line 764, in compile p = sre_parse.parse(p, flags) File "/usr/lib/python3.7/sre_parse.py", line 934, in parse p.pattern.flags = fix_flags(str, p.pattern.flags) File "/usr/lib/python3.7/sre_parse.py", line 901, in fix_flags raise ValueError("cannot use LOCALE flag with a str pattern") ValueError: cannot use LOCALE flag with a str pattern


Ran 4 tests in 0.002s

FAILED (errors=4) nahuel@nahuel-Notebook:~/Documents/TESIS/Tutoriales/wyrm/test$ python test_select_channels.py EEEE

ERROR: test_select_channels (main.TestSelectChannels) Selecting channels with an array of regexes.

Traceback (most recent call last): File "test_select_channels.py", line 22, in test_select_channels self.dat = select_channels(self.dat, ['ca.*', 'cc1']) File "/home/nahuel/.local/lib/python3.7/site-packages/wyrm/processing.py", line 455, in select_channels m = re.match(regexp, c, re.IGNORECASE | re.LOCALE) File "/usr/lib/python3.7/re.py", line 173, in match return _compile(pattern, flags).match(string) File "/usr/lib/python3.7/re.py", line 286, in _compile p = sre_compile.compile(pattern, flags) File "/usr/lib/python3.7/sre_compile.py", line 764, in compile p = sre_parse.parse(p, flags) File "/usr/lib/python3.7/sre_parse.py", line 934, in parse p.pattern.flags = fix_flags(str, p.pattern.flags) File "/usr/lib/python3.7/sre_parse.py", line 901, in fix_flags raise ValueError("cannot use LOCALE flag with a str pattern") ValueError: cannot use LOCALE flag with a str pattern

====================================================================== ERROR: test_select_channels_copy (main.TestSelectChannels) Select channels must not change the original parameter.

Traceback (most recent call last): File "test_select_channels.py", line 36, in test_select_channels_copy select_channels(self.dat, ['ca.*']) File "/home/nahuel/.local/lib/python3.7/site-packages/wyrm/processing.py", line 455, in select_channels m = re.match(regexp, c, re.IGNORECASE | re.LOCALE) File "/usr/lib/python3.7/re.py", line 173, in match return _compile(pattern, flags).match(string) File "/usr/lib/python3.7/re.py", line 286, in _compile p = sre_compile.compile(pattern, flags) File "/usr/lib/python3.7/sre_compile.py", line 764, in compile p = sre_parse.parse(p, flags) File "/usr/lib/python3.7/sre_parse.py", line 934, in parse p.pattern.flags = fix_flags(str, p.pattern.flags) File "/usr/lib/python3.7/sre_parse.py", line 901, in fix_flags raise ValueError("cannot use LOCALE flag with a str pattern") ValueError: cannot use LOCALE flag with a str pattern

====================================================================== ERROR: test_select_channels_inverse (main.TestSelectChannels) Removing channels with an array of regexes.

Traceback (most recent call last): File "test_select_channels.py", line 29, in test_select_channels_inverse self.dat = select_channels(self.dat, ['ca.*', 'cc1'], invert=True) File "/home/nahuel/.local/lib/python3.7/site-packages/wyrm/processing.py", line 455, in select_channels m = re.match(regexp, c, re.IGNORECASE | re.LOCALE) File "/usr/lib/python3.7/re.py", line 173, in match return _compile(pattern, flags).match(string) File "/usr/lib/python3.7/re.py", line 286, in _compile p = sre_compile.compile(pattern, flags) File "/usr/lib/python3.7/sre_compile.py", line 764, in compile p = sre_parse.parse(p, flags) File "/usr/lib/python3.7/sre_parse.py", line 934, in parse p.pattern.flags = fix_flags(str, p.pattern.flags) File "/usr/lib/python3.7/sre_parse.py", line 901, in fix_flags raise ValueError("cannot use LOCALE flag with a str pattern") ValueError: cannot use LOCALE flag with a str pattern

====================================================================== ERROR: test_select_channels_swapaxis (main.TestSelectChannels) Select channels works with non default chanaxis.

Traceback (most recent call last): File "test_select_channels.py", line 41, in test_select_channels_swapaxis dat1 = select_channels(swapaxes(self.dat, 0, 1), ['ca.*'], chanaxis=0) File "/home/nahuel/.local/lib/python3.7/site-packages/wyrm/processing.py", line 455, in select_channels m = re.match(regexp, c, re.IGNORECASE | re.LOCALE) File "/usr/lib/python3.7/re.py", line 173, in match return _compile(pattern, flags).match(string) File "/usr/lib/python3.7/re.py", line 286, in _compile p = sre_compile.compile(pattern, flags) File "/usr/lib/python3.7/sre_compile.py", line 764, in compile p = sre_parse.parse(p, flags) File "/usr/lib/python3.7/sre_parse.py", line 934, in parse p.pattern.flags = fix_flags(str, p.pattern.flags) File "/usr/lib/python3.7/sre_parse.py", line 901, in fix_flags raise ValueError("cannot use LOCALE flag with a str pattern") ValueError: cannot use LOCALE flag with a str pattern


Ran 4 tests in 0.002s

FAILED (errors=4)