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

watch mode does not recover after error #82

Open
dgrammlich opened this issue Feb 14, 2022 · 3 comments
Open

watch mode does not recover after error #82

dgrammlich opened this issue Feb 14, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@dgrammlich
Copy link
Contributor

dgrammlich commented Feb 14, 2022

I use Buchungsstreber 2.8.0 with YAML format.

I started Buchungsstreber in watch mode. After that I started it in a second terminal in edit mode. It is configured to use ncalcli and resolve the incoming dates via regex to template identifiers. If one of the dates has no resolver or identifier, this error occurs:

NoMethodError: undefined method 'valid_activity?' for nil:NilClass

It seems that the lines with error messages move the other content up and out of the window.

buchungsstreber-watch-1

In edit mode I remove the conflicting date and save the file. The watch mode still shows the error, even after I press ENTER to reload it manually.

buchungsstreber-watch-2

Starting the watch mode with a valid file seems fine.

@dgrammlich dgrammlich added the bug Something isn't working label Feb 14, 2022
@dgrammlich dgrammlich added this to the Release 2.8.1 milestone Feb 14, 2022
@dgrammlich dgrammlich changed the title Watch mode does not recover after error watch mode does not recover after error Feb 14, 2022
@dgrammlich
Copy link
Contributor Author

Maybe seems to be related to resolvers or generators? Since an uncomplete entry

  - 0.5  # TODO

looks like this

buchungsstreber-watch-3

@BuJo
Copy link
Member

BuJo commented Feb 16, 2022

Bitte einmal vollstaendigen stacktrace via:

buchungsstreber watch --long --debug ....... 2>foo.err

@dgrammlich
Copy link
Contributor Author

NoMethodError: undefined method `valid_activity?' for nil:NilClass
  /.../.rbenv/versions/2.5.8/lib/ruby/gems/2.5.0/gems/buchungsstreber-2.8.1/lib/buchungsstreber/validator.rb:28:in `validate'
  /.../.rbenv/versions/2.5.8/lib/ruby/gems/2.5.0/gems/buchungsstreber-2.8.1/lib/buchungsstreber.rb:68:in `block (2 levels) in entries'
  /.../.rbenv/versions/2.5.8/lib/ruby/gems/2.5.0/gems/buchungsstreber-2.8.1/lib/buchungsstreber.rb:119:in `fake_stderr'
  /.../.rbenv/versions/2.5.8/lib/ruby/gems/2.5.0/gems/buchungsstreber-2.8.1/lib/buchungsstreber.rb:67:in `block in entries'
  /.../.rbenv/versions/2.5.8/lib/ruby/gems/2.5.0/gems/buchungsstreber-2.8.1/lib/buchungsstreber.rb:64:in `each'
  /.../.rbenv/versions/2.5.8/lib/ruby/gems/2.5.0/gems/buchungsstreber-2.8.1/lib/buchungsstreber.rb:64:in `entries'
  /.../.rbenv/versions/2.5.8/lib/ruby/gems/2.5.0/gems/buchungsstreber-2.8.1/lib/buchungsstreber/cli/tui.rb:106:in `redraw'
  /.../.rbenv/versions/2.5.8/lib/ruby/gems/2.5.0/gems/buchungsstreber-2.8.1/lib/buchungsstreber/cli/tui.rb:301:in `on_input'
  /.../.rbenv/versions/2.5.8/lib/ruby/gems/2.5.0/gems/buchungsstreber-2.8.1/lib/buchungsstreber/cli/tui.rb:73:in `start'
  /.../.rbenv/versions/2.5.8/lib/ruby/gems/2.5.0/gems/buchungsstreber-2.8.1/lib/buchungsstreber/cli/app.rb:202:in `watch'
  /.../.rbenv/versions/2.5.8/lib/ruby/gems/2.5.0/gems/buchungsstreber-2.8.1/lib/buchungsstreber/cli/runner.rb:20:in `execute!'
  /.../.rbenv/versions/2.5.8/lib/ruby/gems/2.5.0/gems/buchungsstreber-2.8.1/bin/buchungsstreber:19:in `<top (required)>'
  /.../.rbenv/versions/2.5.8/bin/buchungsstreber:23:in `load'
  /.../.rbenv/versions/2.5.8/bin/buchungsstreber:23:in `<main>'
  ...

@dgrammlich dgrammlich modified the milestones: Release 2.8.2, Release 2.8.3 Feb 24, 2022
@dgrammlich dgrammlich removed this from the Release 2.8.3 milestone Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants