Skip to content

FIFOPerformanceSummaryUnderlying has no attribute 'subCategory' #74

@jacob-merson

Description

@jacob-merson

Hello,

First of all, thank you for your package; it saves me a lot of time by not having to write my own parser. I'm trying to use it as instructed, have created a flex query, but when I try to read in the file, I get the following error:

ibflex.parser.FlexParserError: FIFOPerformanceSummaryUnderlying has no attribute 'subCategory'

Having added a subCategory optional attribute to the FIFOPerformanceSummaryUnderlying dataclass, I was then prompted with having no attribute 'figi'. All in all, I needed to add various attribute fields to a number of dataclasses in Types until it finally produced another error:

Python 3.11.1 (main, Feb 1 2023, 16:53:50) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

from ibflex import parser ; response = parser.parse("Summary.xml")
Traceback (most recent call last):
File "/Users/Jacob/.pyenv/versions/3.11.1/lib/python3.11/site-packages/ibflex/parser.py", line 131, in parse_data_element
return Class(**attrs)
^^^^^^^^^^^^^^
TypeError: FlexQueryResponse.init() got an unexpected keyword argument 'script'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 1, in
File "/Users/Jacob/.pyenv/versions/3.11.1/lib/python3.11/site-packages/ibflex/parser.py", line 53, in parse
parsed = parse_element(root)
^^^^^^^^^^^^^^^^^^^
File "/Users/Jacob/.pyenv/versions/3.11.1/lib/python3.11/site-packages/ibflex/parser.py", line 85, in parse_element
return parse_data_element(elem)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/Jacob/.pyenv/versions/3.11.1/lib/python3.11/site-packages/ibflex/parser.py", line 133, in parse_data_element
raise FlexParserError(f"{Class.name} - " + str(exc))
ibflex.parser.FlexParserError: FlexQueryResponse - FlexQueryResponse.init() got an unexpected keyword argument 'script'

At this point, I'm not sure how to proceed/not sure if it's user error or a bug in the code because I think the 'script' keyword may have come from my flex file, in which case I'm not sure what settings I need to change in my flex file configuration to keep this from happening. Any help would be greatly appreciated.

Thank you in advance.

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