You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

207 lines
14 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

INFO:django.utils.autoreload:F:\imageprocess\imageProcess\basicFunction\views.py changed, reloading.
ERROR:django.request:Internal Server Error: /keying/
Traceback (most recent call last):
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\core\handlers\exception.py", line 47, in inner
response = get_response(request)
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\core\handlers\base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\views\decorators\http.py", line 40, in inner
return func(request, *args, **kwargs)
File "F:\imageprocess\imageProcess\basicFunction\views.py", line 131, in keying
result=cvtobase64(image)
File "F:\imageprocess\imageProcess\basicFunction\views.py", line 32, in cvtobase64
res_b = cv2.imencode('.jpg', img)[1].tostring()
cv2.error: OpenCV(4.6.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\loadsave.cpp:976: error: (-215:Assertion failed) !image.empty() in function 'cv::imencode'
INFO:django.utils.autoreload:F:\imageprocess\imageProcess\basicFunction\views.py changed, reloading.
ERROR:django.request:Internal Server Error: /keying/
Traceback (most recent call last):
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\core\handlers\exception.py", line 47, in inner
response = get_response(request)
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\core\handlers\base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\views\decorators\http.py", line 40, in inner
return func(request, *args, **kwargs)
File "F:\imageprocess\imageProcess\basicFunction\views.py", line 131, in keying
result=cvtobase64(image)
File "F:\imageprocess\imageProcess\basicFunction\views.py", line 32, in cvtobase64
res_b = cv2.imencode('.jpg', img)[1].tostring()
cv2.error: OpenCV(4.6.0) D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\loadsave.cpp:976: error: (-215:Assertion failed) !image.empty() in function 'cv::imencode'
INFO:django.utils.autoreload:F:\imageprocess\imageProcess\basicFunction\views.py changed, reloading.
ERROR:django.request:Internal Server Error: /keying/
Traceback (most recent call last):
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\core\handlers\exception.py", line 47, in inner
response = get_response(request)
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\core\handlers\base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\views\decorators\http.py", line 40, in inner
return func(request, *args, **kwargs)
File "F:\imageprocess\imageProcess\basicFunction\views.py", line 132, in keying
return JsonResponse(data={"image": result}, json_dumps_params={'ensure_ascii': False})
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\http\response.py", line 603, in __init__
data = json.dumps(data, cls=encoder, **json_dumps_params)
File "C:\Users\ASUS\anaconda3\lib\json\__init__.py", line 234, in dumps
return cls(
File "C:\Users\ASUS\anaconda3\lib\json\encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "C:\Users\ASUS\anaconda3\lib\json\encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\core\serializers\json.py", line 105, in default
return super().default(o)
File "C:\Users\ASUS\anaconda3\lib\json\encoder.py", line 179, in default
raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type bytes is not JSON serializable
INFO:django.utils.autoreload:F:\imageprocess\imageProcess\basicFunction\views.py changed, reloading.
INFO:django.utils.autoreload:F:\imageprocess\imageProcess\basicFunction\views.py changed, reloading.
ERROR:django.request:Internal Server Error: /keying/
Traceback (most recent call last):
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\core\handlers\exception.py", line 47, in inner
response = get_response(request)
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\core\handlers\base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\views\decorators\http.py", line 40, in inner
return func(request, *args, **kwargs)
File "F:\imageprocess\imageProcess\basicFunction\views.py", line 129, in keying
rmbg.remove_background_from_base64_img(image,bg_color=(0,0,0))
File "C:\Users\ASUS\anaconda3\lib\site-packages\removebg\removebg.py", line 72, in remove_background_from_base64_img
response.raise_for_status()
File "C:\Users\ASUS\anaconda3\lib\site-packages\requests\models.py", line 943, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.remove.bg/v1.0/removebg
ERROR:django.request:Internal Server Error: /keying/
Traceback (most recent call last):
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\core\handlers\exception.py", line 47, in inner
response = get_response(request)
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\core\handlers\base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\views\decorators\http.py", line 40, in inner
return func(request, *args, **kwargs)
File "F:\imageprocess\imageProcess\basicFunction\views.py", line 129, in keying
rmbg.remove_background_from_base64_img(image,bg_color=(0,0,0))
File "C:\Users\ASUS\anaconda3\lib\site-packages\removebg\removebg.py", line 72, in remove_background_from_base64_img
response.raise_for_status()
File "C:\Users\ASUS\anaconda3\lib\site-packages\requests\models.py", line 943, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.remove.bg/v1.0/removebg
INFO:django.utils.autoreload:F:\imageprocess\imageProcess\basicFunction\views.py changed, reloading.
ERROR:django.request:Internal Server Error: /keying/
Traceback (most recent call last):
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\core\handlers\exception.py", line 47, in inner
response = get_response(request)
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\core\handlers\base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\views\decorators\http.py", line 40, in inner
return func(request, *args, **kwargs)
File "F:\imageprocess\imageProcess\basicFunction\views.py", line 128, in keying
result=getbase64byndarray(image)
File "F:\imageprocess\imageProcess\basicFunction\views.py", line 42, in getbase64byndarray
retval, buffer = cv2.imencode('.jpg', pic_img)
cv2.error: OpenCV(4.6.0) :-1: error: (-5:Bad argument) in function 'imencode'
> Overload resolution failed:
> - img is not a numpy array, neither a scalar
> - Expected Ptr<cv::UMat> for argument 'img'
INFO:django.utils.autoreload:F:\imageprocess\imageProcess\basicFunction\views.py changed, reloading.
ERROR:django.request:Internal Server Error: /keying/
Traceback (most recent call last):
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\core\handlers\exception.py", line 47, in inner
response = get_response(request)
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\core\handlers\base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\views\decorators\http.py", line 40, in inner
return func(request, *args, **kwargs)
File "F:\imageprocess\imageProcess\basicFunction\views.py", line 128, in keying
result=getbase64byndarray(image)
File "F:\imageprocess\imageProcess\basicFunction\views.py", line 42, in getbase64byndarray
retval, buffer = cv2.imencode('.jpg', pic_img)
cv2.error: OpenCV(4.6.0) :-1: error: (-5:Bad argument) in function 'imencode'
> Overload resolution failed:
> - img is not a numpy array, neither a scalar
> - Expected Ptr<cv::UMat> for argument 'img'
INFO:django.utils.autoreload:F:\imageprocess\imageProcess\basicFunction\views.py changed, reloading.
ERROR:django.request:Internal Server Error: /keying/
Traceback (most recent call last):
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\core\handlers\exception.py", line 47, in inner
response = get_response(request)
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\core\handlers\base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\views\decorators\http.py", line 40, in inner
return func(request, *args, **kwargs)
File "F:\imageprocess\imageProcess\basicFunction\views.py", line 129, in keying
return JsonResponse(data={"image": result}, json_dumps_params={'ensure_ascii': False})
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\http\response.py", line 603, in __init__
data = json.dumps(data, cls=encoder, **json_dumps_params)
File "C:\Users\ASUS\anaconda3\lib\json\__init__.py", line 234, in dumps
return cls(
File "C:\Users\ASUS\anaconda3\lib\json\encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "C:\Users\ASUS\anaconda3\lib\json\encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\core\serializers\json.py", line 105, in default
return super().default(o)
File "C:\Users\ASUS\anaconda3\lib\json\encoder.py", line 179, in default
raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type ndarray is not JSON serializable
INFO:django.utils.autoreload:F:\imageprocess\imageProcess\basicFunction\views.py changed, reloading.
INFO:django.utils.autoreload:F:\imageprocess\imageProcess\basicFunction\views.py changed, reloading.
ERROR:django.request:Internal Server Error: /keying/
Traceback (most recent call last):
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\core\handlers\exception.py", line 47, in inner
response = get_response(request)
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\core\handlers\base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\views\decorators\http.py", line 40, in inner
return func(request, *args, **kwargs)
File "F:\imageprocess\imageProcess\basicFunction\views.py", line 127, in keying
rmbg.remove_background_from_base64_img(image,new_file_name="output.jpg",bg_color=(0,0,0))
File "C:\Users\ASUS\anaconda3\lib\site-packages\removebg\removebg.py", line 72, in remove_background_from_base64_img
response.raise_for_status()
File "C:\Users\ASUS\anaconda3\lib\site-packages\requests\models.py", line 943, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.remove.bg/v1.0/removebg
ERROR:django.request:Internal Server Error: /keying/
Traceback (most recent call last):
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\core\handlers\exception.py", line 47, in inner
response = get_response(request)
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\core\handlers\base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\views\decorators\http.py", line 40, in inner
return func(request, *args, **kwargs)
File "F:\imageprocess\imageProcess\basicFunction\views.py", line 127, in keying
rmbg.remove_background_from_base64_img(image,new_file_name="output.jpg",bg_color=(0,0,0))
File "C:\Users\ASUS\anaconda3\lib\site-packages\removebg\removebg.py", line 72, in remove_background_from_base64_img
response.raise_for_status()
File "C:\Users\ASUS\anaconda3\lib\site-packages\requests\models.py", line 943, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.remove.bg/v1.0/removebg
INFO:django.utils.autoreload:F:\imageprocess\imageProcess\basicFunction\views.py changed, reloading.
ERROR:django.request:Internal Server Error: /keying/
Traceback (most recent call last):
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\core\handlers\exception.py", line 47, in inner
response = get_response(request)
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\core\handlers\base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\views\decorators\http.py", line 40, in inner
return func(request, *args, **kwargs)
File "F:\imageprocess\imageProcess\basicFunction\views.py", line 128, in keying
rmbg.remove_background_from_base64_img(image,new_file_name="output.jpg",bg_color=(0,0,0))
File "C:\Users\ASUS\anaconda3\lib\site-packages\removebg\removebg.py", line 72, in remove_background_from_base64_img
response.raise_for_status()
File "C:\Users\ASUS\anaconda3\lib\site-packages\requests\models.py", line 943, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.remove.bg/v1.0/removebg
ERROR:django.request:Internal Server Error: /smooth/
Traceback (most recent call last):
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\core\handlers\exception.py", line 47, in inner
response = get_response(request)
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\core\handlers\base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:\Users\ASUS\anaconda3\lib\site-packages\django\views\decorators\http.py", line 40, in inner
return func(request, *args, **kwargs)
File "F:\imageprocess\imageProcess\basicFunction\views.py", line 153, in smooth
num.append((imgarray[m][n])[0]) # <20><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD>ɫͼ<C9AB><CDBC><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵҲ<D6B5><D2B2><EFBFBD>Ը<EFBFBD>Ϊ<EFBFBD>ڶ<EFBFBD><DAB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD>
IndexError: index 800 is out of bounds for axis 0 with size 800
INFO:django.utils.autoreload:F:\imageprocess\imageProcess\basicFunction\views.py changed, reloading.