Skip to content

AssertionError: Must use python 3.7.0 or higher for the regular expressions to work correctly. #5

@yihahn

Description

@yihahn
text = '''Assessment and Plan
61 yo male Hep C cirrhosis
Abd pain:
-other labs: PT / PTT / INR:16.6//    1.5, CK / CKMB /
ICU Care
-other labs: PT / PTT / INR:16.6//    1.5, CK / CKMB /
Assessment and Plan
'''
bloatectomy(text)
---------------------------------------------------------------------------
AssertionError                            Traceback (most recent call last)
Cell In[44], line 10
      1 # bloatectomy(nur_df.loc[0, 'progress_notes'])
      2 text = '''Assessment and Plan
      3 61 yo male Hep C cirrhosis
      4 Abd pain:
   (...)
      8 Assessment and Plan
      9 '''
---> 10 bloatectomy(text)

File ~/.local/lib/python3.10/site-packages/bloatectomy/bloatectomy.py:41, in bloatectomy.__init__(self, input_text, path, filename, display, style, output, output_numbered_tokens, output_original_tokens, regex1, regex2, postgres_engine, postgres_table)
     38 self.postgres_table = postgres_table
     39 self.engine  = postgres_engine
---> 41 assert float(sys.version[0:3]) >= 3.7, "Must use python 3.7.0 or higher for the regular expressions to work correctly."
     43 try:
     44     if  input_text.split('.')[1] == 'docx' or input_text.split('.')[1] == 'doc':

AssertionError: Must use python 3.7.0 or higher for the regular expressions to work correctly.

Now it's the era of python 3.10, it would be better to change to sys.version[0:4].

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