Skip to content

Conversation

@clouserw
Copy link
Contributor

@clouserw clouserw commented Jan 6, 2026

examples/import.py currently crashes when the entry has more than one slash. For example, I ran into this:

COMCAST / XFINITY 800-266 / COMCAST / XFINITY 800-266-2278 WA

This patch splits on the last slash which is a compromise but better than splitting on the first, I think.

@dnicolodi
Copy link
Collaborator

The example is just an example that should handle only the example data. How do you run into a issue with it?

@clouserw
Copy link
Contributor Author

clouserw commented Jan 7, 2026

People use examples as templates. I copied it to use on other data and ran into the problem.

@dnicolodi dnicolodi force-pushed the patch-1 branch 3 times, most recently from 00289e8 to c07da88 Compare January 7, 2026 20:23
dnicolodi and others added 2 commits January 7, 2026 21:51
This code escapes its demonstrative purpose and is copied into user
setups. Fix the import hook to be robust against narration containing
multiple slashes. Splitting on the last slash is arbitrary but good as
any other choice.
@dnicolodi dnicolodi merged commit f700fcd into beancount:master Jan 7, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants