isaacharrisholt / quiffen

Quiffen is a Python package for parsing QIF (Quicken Interchange Format) files.
MIT License
30 stars 23 forks source link

Unknown line code S #61

Open WolfgangFahl opened 11 months ago

WolfgangFahl commented 11 months ago

this is related to #60

According to https://en.wikipedia.org/wiki/Quicken_Interchange_Format and http://www.respmech.com/mym2qifw/qif_new.htm

S is for a split category similar to L ...

isaacharrisholt commented 11 months ago

I find it strange that you've had this issue. This case is handled on line 366 of transaction.py:

            if line_code == "S":
                _, field_info, classes = cls._create_class_from_category_string(
                    field_info,
                    classes,
                )

                split_category = create_categories_from_hierarchy(field_info)
                new_split = Split(category=split_category)
                splits.append(new_split)
                current_split = new_split
WolfgangFahl commented 11 months ago

The problem is in category.py:

error    2:Unknown line code: S
  File "/Users/wf/Library/Python/3.10/lib/python/site-packages/quiffen/core/qif.py", line 263, in parse
    new_category = Category.from_list(sanitised_section_lines)
  File "/Users/wf/Library/Python/3.10/lib/python/site-packages/quiffen/core/category.py", line 466, in from_list
    raise ValueError(f"Unknown line code: {line_code}")