aboutcode-org / aboutcode-org/purldb
debian collector is failing
- 主要言語
- HTML
- スター
- 67
- フォーク
- 69
- 平均マージ
- 8日 8時間
- マージ済み PR(30日)
- 1
説明
The [return statement ](https://github.com/aboutcode-org/purldb/blob/e638d183b35c579f56140f453c530f0288fe182d/minecode/collectors/debian.py#L71) should be inside the `if` statement.
If there `has_version` is null then `error` remains undefined.
I receive below error while running the code:
File "/opt/purldb/venv/lib/python3.12/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/purldb/venv/lib/python3.12/site-packages/django/core/handlers/base.py", line 197, in getresponse
response = wrapped_callback(request, callback_args, **callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/contextlib.py", line 81, in inner
return func(args, kwds)
^^^^^^^^^^^^^^^^^^^
File "/opt/purldb/venv/lib/python3.12/site-packages/django/views/decorators/csrf.py", line 65, in viewwrapper
return view_func(request, *args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/purldb/venv/lib/python3.12/site-packages/rest_framework/viewsets.py", line 124, in view
return self.dispatch(request, *args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/purldb/venv/lib/python3.12/site-packages/rest_framework/views.py", line 509, in dispatch
response = self.handle_exception(exc)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/purldb/venv/lib/python3.12/site-packages/rest_framework/views.py", line 469, in handle_exception
self.raise_uncaught_exception(exc)
File "/opt/purldb/venv/lib/python3.12/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
raise exc
File "/opt/purldb/venv/lib/python3.12/site-packages/rest_framework/views.py", line 506, in dispatch
response = handler(request, *args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/purldb/packagedb/api.py", line 825, in list
errors = priority_router.process(purl, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/purldb/minecode/route.py", line 159, in process
return endpoint(string, *args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/purldb/minecode/collectors/debian.py", line 71, in process_request
return error
^^^^^
UnboundLocalError: cannot access local variable 'error' where it is not associated with a value
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。