Skip to content

Reg Expression- causes error #17

@astoermann

Description

@astoermann

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions