redstreet/beancount_reds_importers

Further adventures with UOB xls importer

Closed this issue · 2 comments

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
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!

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.

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