You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[1.3.0] blurb crashes both with absent or empty GitHub issue (and should help with how to appraoch that case) #34
# blurb add
Traceback (most recent call last):
File "[..]/cpython/venv/bin/blurb", line 8, in <module>
sys.exit(main())
^^^^^^
File "[..]/cpython/venv/lib/python3.11/site-packages/blurb/blurb.py", line 1273, in main
sys.exit(fn(*filtered_args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "[..]/cpython/venv/lib/python3.11/site-packages/blurb/blurb.py", line 940, in add
blurb.load(tmp_path)
File "[..]/cpython/venv/lib/python3.11/site-packages/blurb/blurb.py", line 540, in loadself.parse(text, metadata=metadata, filename=filename)
File "[..]/cpython/venv/lib/python3.11/site-packages/blurb/blurb.py", line 530, in parse
finish_entry()
File "[..]/cpython/venv/lib/python3.11/site-packages/blurb/blurb.py", line 485, in finish_entryif key =="gh-issue"andint(value) < lowest_possible_gh_issue_number:
^^^^^^^^^^ValueError: invalid literal for int() with base 10: ''
…and this is blurb 1.3.0 with line # .. gh-issue: (i.e. commented out):
# blurb add
Traceback (most recent call last):
File "[..]/cpython/venv/bin/blurb", line 8, in <module>
sys.exit(main())
^^^^^^
File "[..]/cpython/venv/lib/python3.11/site-packages/blurb/blurb.py", line 1273, in main
sys.exit(fn(*filtered_args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "[..]/cpython/venv/lib/python3.11/site-packages/blurb/blurb.py", line 962, in add
path = blurb.save_next()
^^^^^^^^^^^^^^^^^
File "[..]/cpython/venv/lib/python3.11/site-packages/blurb/blurb.py", line 637, in save_next
filename = blurb._extract_next_filename()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "[..]/cpython/venv/lib/python3.11/site-packages/blurb/blurb.py", line 628, in _extract_next_filenamereturn path
^^^^UnboundLocalError: cannot access local variable 'path' where it is not associated with a value
Neither case should crash and the text would ideally help about making that case work where adequate.
Activity
hugovk commentedon Nov 9, 2024
Please see PR #35 to fix the first part.
hartwork commentedon Nov 9, 2024
@hugovk cool!
hugovk commentedon Nov 9, 2024
And updated to include the second part as well.