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

aiida crashes if file for extra info is not saved #4552

Closed
alinelena opened this issue Nov 9, 2020 · 4 comments
Closed

aiida crashes if file for extra info is not saved #4552

alinelena opened this issue Nov 9, 2020 · 4 comments
Labels
topic/verdi type/bug type/duplicate close issue when applying duplicate label
Milestone

Comments

@alinelena
Copy link

Trying to add a new computer/code will crash aiida if the file is not saved

Traceback (most recent call last):
  File "/srv/vault/anaconda3/envs/aiida/bin/verdi", line 8, in <module>
    sys.exit(verdi())
  File "/srv/vault/anaconda3/envs/aiida/lib/python3.8/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/srv/vault/anaconda3/envs/aiida/lib/python3.8/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/srv/vault/anaconda3/envs/aiida/lib/python3.8/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/srv/vault/anaconda3/envs/aiida/lib/python3.8/site-packages/click/core.py", line 1135, in invoke
    sub_ctx = cmd.make_context(cmd_name, args, parent=ctx)
  File "/srv/vault/anaconda3/envs/aiida/lib/python3.8/site-packages/click/core.py", line 641, in make_context
    self.parse_args(ctx, args)
  File "/srv/vault/anaconda3/envs/aiida/lib/python3.8/site-packages/click/core.py", line 940, in parse_args
    value, args = param.handle_parse_result(ctx, opts, args)
  File "/srv/vault/anaconda3/envs/aiida/lib/python3.8/site-packages/click/core.py", line 1476, in handle_parse_result
    value = invoke_param_callback(
  File "/srv/vault/anaconda3/envs/aiida/lib/python3.8/site-packages/click/core.py", line 96, in invoke_param_callback
    return callback(ctx, param, value)
  File "/srv/vault/anaconda3/envs/aiida/lib/python3.8/site-packages/aiida/cmdline/params/options/interactive.py", line 276, in prompt_callback
    value = self.prompt_loop(ctx, param, value)
  File "/srv/vault/anaconda3/envs/aiida/lib/python3.8/site-packages/aiida/cmdline/params/options/interactive.py", line 210, in simple_prompt_loop
    value = self.prompt_func(ctx)
  File "/srv/vault/anaconda3/envs/aiida/lib/python3.8/site-packages/aiida/cmdline/params/options/interactive.py", line 311, in prompt_func
    return edit_multiline_template(self.template, extension=self.extension, **kwargs)
  File "/srv/vault/anaconda3/envs/aiida/lib/python3.8/site-packages/aiida/cmdline/utils/multi_line_input.py", line 34, in edit_multiline_template
    return value
UnboundLocalError: local variable 'value' referenced before assignment

steps to reproduce, here i use vim

verdi computer setup

fill everything as prompted when asked to do so.
when comes to append extra lines, do not save just use :q that will generate the crash above.

this happens for both computer/code mainly due to assumption that a file will always exist to be appended

@chrisjsewell
Copy link
Member

chrisjsewell commented Nov 9, 2020

thanks for the report @alinelena

@greschd
Copy link
Member

greschd commented Nov 9, 2020

@alinelena Which AiiDA version are you using here? There was a similar issue recently, fixed in #4436. The fix should be in version 1.4.3.

@sphuber
Copy link
Contributor

sphuber commented Nov 9, 2020

Yes, this was fixed in PR #4436 which was released with 1.4.3

@sphuber sphuber closed this as completed Nov 9, 2020
@sphuber sphuber added this to the v1.4.3 milestone Nov 9, 2020
@sphuber sphuber added the type/duplicate close issue when applying duplicate label label Nov 9, 2020
@sphuber
Copy link
Contributor

sphuber commented Nov 9, 2020

Duplicate of #4435

@sphuber sphuber marked this as a duplicate of #4435 Nov 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/verdi type/bug type/duplicate close issue when applying duplicate label
Projects
None yet
Development

No branches or pull requests

4 participants