egh / ledger-autosync

Synchronize your ledger-cli files with your bank.
GNU General Public License v3.0
273 stars 42 forks source link

Chokes on long payees #16

Closed bdrister closed 7 years ago

bdrister commented 7 years ago
While parsing value expression:
  (real)&((payee =~ /...256 characters of stuff... ...10 more chars/))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Invalid char ' ' (wanted '/')
ERROR:root:Error checking --real payee for ...256 characters of stuff... ...10 more chars

I originally came to file this more urgently as it appeared that it was causing the program to immediately stop and only whatever partial output had been flushed at that point survived, but as I was doing a final repro on this I found myself unable to reproduce that part of it. Hmm. If I see that again, I'll let you know, but for now this seems to be simply a logged error that's not blocking functionality.

egh commented 7 years ago

Can you send me the payee that is a problem? It might be a quoting issue rather than a length issue. Thanks!

bdrister commented 7 years ago

Anonymized to just indicate letters/numbers/other, they're of the form:

XXX XXXX XX 000000 XXXXXXXXXX:XXXXXXXX, XXX. XX/000000000000 XXXXXX XXXXXXX, XXXX XXXX 0 XXX XXXX XXXXX, 00XX XXXXX XXX XXXX XX 000000000 XXXXXXXX, X.X. XXX:000000000 XXXXXXXXXXX:XXXXXXXX XXXXXX XX/0000000000 000 XXXXX XXX XX X XXXXXXXXXX XX 000000000

bdrister commented 7 years ago

Correction; I'd just grabbed a similar payee, but it seems like they're not all exactly identical. One grabbed directly from the error message is:

XXX XXXX XX 000000 XXXXXXXXXX:XXXXXXXX, XXX. XXXXXXXXX XXXXXX XX\/000000000000 XXXXXX XXXXXXX, XXXX XXX 0 XXX XXXX XXXXX, XXXXX 00 XXX XXXX XX 000000000 XXXXXXXX, X.X. XXX:000000000 XXXXXXXXXXX:XXXXXXXX XXXXXX XX\/0000000000 000 XXXXX XXX XX X XXXXXXXXXX XX 000000000

bdrister commented 7 years ago

(That includes the escaping of the slashes, incidentally, since it's from the error message. The original payee doesn't have those."

egh commented 7 years ago

Thanks for this! Should be fixed now (in master, not yet released).