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

hledger-web HTTP 500 when using -f - (journal read from standard input) #1189

Closed
lestephane opened this issue Feb 11, 2020 · 3 comments
Closed
Labels
A-BUG Something wrong, confusing or sub-standard in the software, docs, or user experience. web The hledger-web tool.

Comments

@lestephane
Copy link

this works

$ ~/.local/bin/hledger-web -f test.journal

this doesn't

$ ~/.local/bin/hledger-web -f - < test.journal
11/Feb/2020:14:43:35 +0200 [Info#yesod-core] Application launched @(yesod-core-1.6.16.1-Y4Wlt7bfWTEbaIiws0fJN:Yesod.Core.Dispatch src/Yesod/Core/Dispatch.hs:163:11)
Serving web UI and API on 127.0.0.1:5000 with base url http://127.0.0.1:5000
This server will exit after 2m with no browser windows open (or press ctrl-c)
Opening web browser...
11/Feb/2020:14:43:35 +0200 [Error#yesod-core] <stdin>: hGetBuffering: illegal operation (handle is closed) @(yesod-core-1.6.16.1-Y4Wlt7bfWTEbaIiws0fJN:Yesod.Core.Class.Yesod src/Yesod/Core/Class/Yesod.hs:688:5)
11/Feb/2020:14:43:35 +0200 [Error#yesod-core] Error handler errored out: InternalError "<stdin>: hGetBuffering: illegal operation (handle is closed)" @(yesod-core-1.6.16.1-Y4Wlt7bfWTEbaIiws0fJN:Yesod.Core.Internal.Run src/Yesod/Core/Internal/Run.hs:210:21)
127.0.0.1 - - [11/Feb/2020:14:43:35 +0200] "GET / HTTP/1.1" 500 21 "" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0"
127.0.0.1 - - [11/Feb/2020:14:43:35 +0200] "GET /favicon.ico HTTP/1.1" 200 - "" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0"
@lestephane lestephane added the A-BUG Something wrong, confusing or sub-standard in the software, docs, or user experience. label Feb 11, 2020
@simonmichael simonmichael added the web The hledger-web tool. label Feb 11, 2020
@simonmichael
Copy link
Owner

Thanks for the report. See the earlier #950 and #978. Could you perhaps investigate and find out what happened with #978 ?

@simonmichael
Copy link
Owner

PS documented at https://hledger.org/hledger-web.html#bugs, but if we don't fix this it should at least give a clear error at the start.

@simonmichael
Copy link
Owner

This was fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-BUG Something wrong, confusing or sub-standard in the software, docs, or user experience. web The hledger-web tool.
Projects
None yet
Development

No branches or pull requests

2 participants