redstreet / beancount_reds_importers

Simple ingesting tools for Beancount (plain text, double entry accounting software). More importantly, a framework to allow you to easily write your own importers.
GNU General Public License v3.0
113 stars 38 forks source link

Further adventures with UOB xls importer #78

Closed kaiwei closed 1 year ago

kaiwei commented 1 year ago

Updated to the latest version from git (not sure if this is the real issue) and ran into the following errors when importing:

`Traceback (most recent call last): File "/[HOME_PATH]/.local/lib/python3.11/site-packages/lark/parsers/lalr_parser.py", line 126, in feed_token action, arg = states[state][token.type]


KeyError: 'EOL'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/[HOME_PATH]/.local/bin/autobean-format", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/[HOME_PATH]/.local/lib/python3.11/site-packages/autobean_format/main.py", line 83, in main
    for file in formatter.load_files(filename):
  File "/[HOME_PATH]/.local/lib/python3.11/site-packages/autobean_format/main.py", line 49, in load_files
    model = self._parser.parse(text, models.File)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/[HOME_PATH]/.local/lib/python3.11/site-packages/autobean_refactor/parser.py", line 120, in parse
    model = self._parse(text, target, self._lark)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/[HOME_PATH]/.local/lib/python3.11/site-packages/autobean_refactor/parser.py", line 131, in _parse
    parser.feed_token(token)
  File "/[HOME_PATH]/.local/lib/python3.11/site-packages/lark/parsers/lalr_interactive_parser.py", line 32, in feed_token
    return self.parser_state.feed_token(token, token.type == '$END')
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/[HOME_PATH]/.local/lib/python3.11/site-packages/lark/parsers/lalr_parser.py", line 129, in feed_token
    raise UnexpectedToken(token, expected, state=self, interactive_parser=None)
lark.exceptions.UnexpectedToken: Unexpected token Token('EOL', '') at line 71, column 71.
Expected one of: 
    * TILDE
    * CURRENCY

`

How can I help diagnose this? Thanks!
redstreet commented 1 year ago

This seems to be an autobean_refactor issue, not an importer issue. You should be able to verify that by running just the importer, and ensuring that the importer output works fine with beancount.

kaiwei commented 1 year ago

You're absolutely right - apologies for taking up time.