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

Reg Expression- causes error #17

Open
astoermann opened this issue Jan 31, 2020 · 0 comments
Open

Reg Expression- causes error #17

astoermann opened this issue Jan 31, 2020 · 0 comments

Comments

@astoermann
Copy link

astoermann commented Jan 31, 2020

Cell that causes error:
%%time
'# Find event codes in the data
event_table_raw = myh5.get_event_table(MKPY_DIR / ("stmath_code_map_test.xlsx"))

Output:
searching codes in: stm03/dblock_0


ValueError Traceback (most recent call last)
in

~/.conda/envs/mkconda_0.0.10/lib/python3.6/site-packages/mkpy/mkh5.py in get_event_table(self, code_map_f, header_map_f)
1095 # matches is a list of lists of dict, one dict for each group
1096 code_pattern_matches = ctagger._find_evcodes(
-> 1097 cm["regexp"], dblock_ticks, log_evcodes
1098 )
1099

~/.conda/envs/mkconda_0.0.10/lib/python3.6/site-packages/mkpy/codetagger.py in _find_evcodes(self, pattern, ticks, evcodes)
617 ] # string offset for anchor
618 anchor_idx = delims.index(
--> 619 anchor_delim
620 ) # index in code list of anchor
621 anchor_tick = ticks[anchor_idx] # index into the lists

ValueError: -1 is not in list

stmath_code_map_test.xlsx

~astoermann/Exps/STMath/mkpy/stm03.h5

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