Skip to content

issue parsing config as both file path or string #9

@naphta

Description

@naphta

Getting an exception from pyparsing:

Exception:

pyparsing.ParseException: Expected {Group:({"</" W:(ABCD...) ">" LineEnd}) ^ Group:({"<" {{W:(ABCD...) <SPC><TAB><CR><LF> <= | >= | == | != | < | > | ~ <SPC><TAB><CR><LF> W:(ABCD...)} | {W:(ABCD...)}...} ">" LineEnd}) ^ Group:({W:(ABCD...) Suppress:(<SPC><TAB><CR><LF>) W:(0123...) LineEnd}) ^ Group:({{"#" LineEnd} ^ {"#" {W:(ABCD...)}... LineEnd}}) ^ Group:(LineEnd)} (at char 19), (line:1, col:20)

My code:

f = open(file, 'r')
fs = str(f.read())
apache_parse_obj = parse_config.ParseApacheConfig(apache_file_as_string=fs)
apache_config = apache_parse_obj.parse_config()```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions