Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with long lines: 'Missing or stray quote error' #13

Open
alysbrooks opened this issue Sep 15, 2015 · 0 comments
Open

Issue with long lines: 'Missing or stray quote error' #13

alysbrooks opened this issue Sep 15, 2015 · 0 comments

Comments

@alysbrooks
Copy link

When I first tried to run ledger-web, I received an error when it attempted to load the ledger files into the database:

Loading database
Dumping ledger to file...
Dump finished
Clearing ledger table....
Done clearing ledger table
Loading into database....
Called #<Proc:0x007f84b9d61038@/Library/Ruby/Gems/2.0.0/gems/ledger_web-1.5.2/lib/ledger_web/watcher.rb:20>#call(<DirectoryWatcher::Event type: stable path: '/tmp/all_quoteless.dat'>) and all I got was this lousy exception Missing or stray quote in line 542

I was eventually able to determine that it was tripping over very long lines. Since these were all caused by comments, which all begin with a semicolon, I was able to fix it by stripping out anything that starts with a semicolon (and any leftover lines that start with whitespace) like so: sed "s/;.*//g" ledger.dat | sed "/^ +\$/d".

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

No branches or pull requests

1 participant