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

select_channels error #2

Open
arellanon opened this issue Jul 11, 2020 · 0 comments
Open

select_channels error #2

arellanon opened this issue Jul 11, 2020 · 0 comments

Comments

@arellanon
Copy link

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)

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

No branches or pull requests

1 participant