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

(docker部署)一键同步:服务器内部错误 #355

Open
7Mitu opened this issue Jun 25, 2024 · 0 comments
Open

(docker部署)一键同步:服务器内部错误 #355

7Mitu opened this issue Jun 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@7Mitu
Copy link

7Mitu commented Jun 25, 2024

报错信息:服务器内部错误

操作系统: kali

内核版本:6.8.11

Python 环境版本:docker部署的

Vulfocus 版本:0.3.2.11

详细报错信息或堆栈报错信息

/vulfocus-api/dockerapi/views.py changed, reloading.
INFO:django.utils.autoreload:/vulfocus-api/dockerapi/views.py changed, reloading.
Watching for file changes with StatReloader
[25/Jun/2024 15:19:43] "GET /get/urlname HTTP/1.0" 200 10
[25/Jun/2024 15:19:44] "GET /container/?flag=list&page=1&image_id= HTTP/1.0" 200 52
[25/Jun/2024 15:19:44] "GET /get/urlname HTTP/1.0" 200 10
[25/Jun/2024 15:19:44] "GET /images/?query=&page=1&rank=0&type=&flag=flag HTTP/1.0" 200 52
/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host 'vulfocus.cn'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
  warnings.warn(
Internal Server Error: /get/website/imgs
Traceback (most recent call last):
  File "/vulfocus-api/dockerapi/views.py", line 1581, in get_timing_imgs
    if item['image_name'] == "":
TypeError: string indices must be integers

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.10/site-packages/django/core/handlers/base.py", line 115, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/usr/local/lib/python3.10/site-packages/django/core/handlers/base.py", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/lib/python3.10/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/django/views/generic/base.py", line 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/rest_framework/views.py", line 505, in dispatch
    response = self.handle_exception(exc)
  File "/usr/local/lib/python3.10/site-packages/rest_framework/views.py", line 465, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/usr/local/lib/python3.10/site-packages/rest_framework/views.py", line 476, in raise_uncaught_exception
    raise exc
  File "/usr/local/lib/python3.10/site-packages/rest_framework/views.py", line 502, in dispatch
    response = handler(request, *args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/rest_framework/decorators.py", line 50, in handler
    return func(*args, **kwargs)
  File "/vulfocus-api/dockerapi/views.py", line 1613, in get_timing_imgs
    return JsonResponse({"code": 201, "data": e})
  File "/usr/local/lib/python3.10/site-packages/django/http/response.py", line 558, in __init__
    data = json.dumps(data, cls=encoder, **json_dumps_params)
  File "/usr/local/lib/python3.10/json/__init__.py", line 238, in dumps
    **kw).encode(obj)
  File "/usr/local/lib/python3.10/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/local/lib/python3.10/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/usr/local/lib/python3.10/site-packages/django/core/serializers/json.py", line 104, in default
    return super().default(o)
  File "/usr/local/lib/python3.10/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type TypeError is not JSON serializable
ERROR:django.request:Internal Server Error: /get/website/imgs
Traceback (most recent call last):
  File "/vulfocus-api/dockerapi/views.py", line 1581, in get_timing_imgs
    if item['image_name'] == "":
TypeError: string indices must be integers

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.10/site-packages/django/core/handlers/base.py", line 115, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/usr/local/lib/python3.10/site-packages/django/core/handlers/base.py", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/lib/python3.10/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/django/views/generic/base.py", line 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/rest_framework/views.py", line 505, in dispatch
    response = self.handle_exception(exc)
  File "/usr/local/lib/python3.10/site-packages/rest_framework/views.py", line 465, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/usr/local/lib/python3.10/site-packages/rest_framework/views.py", line 476, in raise_uncaught_exception
    raise exc
  File "/usr/local/lib/python3.10/site-packages/rest_framework/views.py", line 502, in dispatch
    response = handler(request, *args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/rest_framework/decorators.py", line 50, in handler
    return func(*args, **kwargs)
  File "/vulfocus-api/dockerapi/views.py", line 1613, in get_timing_imgs
    return JsonResponse({"code": 201, "data": e})
  File "/usr/local/lib/python3.10/site-packages/django/http/response.py", line 558, in __init__
    data = json.dumps(data, cls=encoder, **json_dumps_params)
  File "/usr/local/lib/python3.10/json/__init__.py", line 238, in dumps
    **kw).encode(obj)
  File "/usr/local/lib/python3.10/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/local/lib/python3.10/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/usr/local/lib/python3.10/site-packages/django/core/serializers/json.py", line 104, in default
    return super().default(o)
  File "/usr/local/lib/python3.10/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type TypeError is not JSON serializable
[25/Jun/2024 15:19:46] "POST /get/website/imgs HTTP/1.0" 500 16826
@7Mitu 7Mitu added the bug Something isn't working label Jun 25, 2024
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

1 participant