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

fix: use get_dbversions instead of db_versions #2255

Merged
merged 1 commit into from
Feb 9, 2024
Merged

Conversation

motorina0
Copy link
Collaborator

@motorina0 motorina0 commented Feb 9, 2024

The use of click in the app itself is an issue. The click.echo() method tries to consume the command line arguments.
In this example port:

poetry run lnbits --port 5555

The error was:

click.exceptions.NoSuchOption: No such option: --port

This issue was reported for a docker run.

Steps:

  • remove the files of an extension
  • start server with this command poetry run lnbits --port 5555

Actual Result:
An exception is thrown:

Error: No such option: --port
2024-02-09 12:29:34.32 | ERROR | Traceback (most recent call last):
  File "/Users/moto/Library/Caches/pypoetry/virtualenvs/lnbits-_FscvqzI-py3.9/lib/python3.9/site-packages/click/core.py", line 1077, in main
    with self.make_context(prog_name, args, **extra) as ctx:
  File "/Users/moto/Library/Caches/pypoetry/virtualenvs/lnbits-_FscvqzI-py3.9/lib/python3.9/site-packages/click/core.py", line 943, in make_context
    self.parse_args(ctx, args)
  File "/Users/moto/Library/Caches/pypoetry/virtualenvs/lnbits-_FscvqzI-py3.9/lib/python3.9/site-packages/click/core.py", line 1405, in parse_args
    opts, args, param_order = parser.parse_args(args=args)
  File "/Users/moto/Library/Caches/pypoetry/virtualenvs/lnbits-_FscvqzI-py3.9/lib/python3.9/site-packages/click/parser.py", line 337, in parse_args
    self._process_args_for_options(state)
  File "/Users/moto/Library/Caches/pypoetry/virtualenvs/lnbits-_FscvqzI-py3.9/lib/python3.9/site-packages/click/parser.py", line 364, in _process_args_for_options
    self._process_opts(arg, state)
  File "/Users/moto/Library/Caches/pypoetry/virtualenvs/lnbits-_FscvqzI-py3.9/lib/python3.9/site-packages/click/parser.py", line 514, in _process_opts
    self._match_long_opt(norm_long_opt, explicit_value, state)
  File "/Users/moto/Library/Caches/pypoetry/virtualenvs/lnbits-_FscvqzI-py3.9/lib/python3.9/site-packages/click/parser.py", line 398, in _match_long_opt
    raise NoSuchOption(opt, possibilities=possibilities, ctx=self.ctx)
click.exceptions.NoSuchOption: No such option: --port

Expected Result:

  • server starts normally (with the fix in this PR)

Copy link

codecov bot commented Feb 9, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (194a527) 59.26% compared to head (9628b9a) 59.26%.

Files Patch % Lines
lnbits/app.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #2255   +/-   ##
=======================================
  Coverage   59.26%   59.26%           
=======================================
  Files          60       60           
  Lines        8992     8992           
=======================================
  Hits         5329     5329           
  Misses       3663     3663           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@motorina0 motorina0 merged commit a0ac41a into dev Feb 9, 2024
22 checks passed
@motorina0 motorina0 deleted the fix_bad_db_versions branch February 9, 2024 12:10
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

Successfully merging this pull request may close these issues.

None yet

3 participants