使用django-audiofield上传时出错

时间:2018-11-27 15:31:02

标签: django

嘿,我正在尝试使用django-field,但遇到此错误:

    Traceback (most recent call last):
  File "C:\Users\Sebastian\Envs\blog\lib\site-packages\django\core\handlers\exception.py", line 35, in inner
    response = get_response(request)
  File "C:\Users\Sebastian\Envs\blog\lib\site-packages\django\core\handlers\base.py", line 128, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "C:\Users\Sebastian\Envs\blog\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "C:\Users\Sebastian\Envs\blog\lib\site-packages\django\contrib\admin\options.py", line 575, in wrapper
    return self.admin_site.admin_view(view)(*args, **kwargs)
  File "C:\Users\Sebastian\Envs\blog\lib\site-packages\django\utils\decorators.py", line 142, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "C:\Users\Sebastian\Envs\blog\lib\site-packages\django\views\decorators\cache.py", line 44, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "C:\Users\Sebastian\Envs\blog\lib\site-packages\django\contrib\admin\sites.py", line 223, in inner
    return view(request, *args, **kwargs)
  File "C:\Users\Sebastian\Envs\blog\lib\site-packages\django\contrib\admin\options.py", line 1557, in change_view
    return self.changeform_view(request, object_id, form_url, extra_context)
  File "C:\Users\Sebastian\Envs\blog\lib\site-packages\django\utils\decorators.py", line 62, in _wrapper
    return bound_func(*args, **kwargs)
  File "C:\Users\Sebastian\Envs\blog\lib\site-packages\django\utils\decorators.py", line 142, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "C:\Users\Sebastian\Envs\blog\lib\site-packages\django\utils\decorators.py", line 58, in bound_func
    return func.__get__(self, type(self))(*args2, **kwargs2)
  File "C:\Users\Sebastian\Envs\blog\lib\site-packages\django\contrib\admin\options.py", line 1451, in changeform_view
    return self._changeform_view(request, object_id, form_url, extra_context)
  File "C:\Users\Sebastian\Envs\blog\lib\site-packages\django\contrib\admin\options.py", line 1491, in _changeform_view
    self.save_model(request, new_object, form, not add)
  File "C:\Users\Sebastian\Envs\blog\lib\site-packages\django\contrib\admin\options.py", line 1027, in save_model
    obj.save()
  File "C:\Users\Sebastian\Envs\blog\lib\site-packages\django\db\models\base.py", line 729, in save
    force_update=force_update, update_fields=update_fields)
  File "C:\Users\Sebastian\Envs\blog\lib\site-packages\django\db\models\base.py", line 769, in save_base
    update_fields=update_fields, raw=raw, using=using,
  File "C:\Users\Sebastian\Envs\blog\lib\site-packages\django\dispatch\dispatcher.py", line 178, in send
    for receiver in self._live_receivers(sender)
  File "C:\Users\Sebastian\Envs\blog\lib\site-packages\django\dispatch\dispatcher.py", line 178, in <listcomp>
    for receiver in self._live_receivers(sender)
  File "C:\Users\Sebastian\Envs\blog\lib\site-packages\audiofield\fields.py", line 223, in _rename_audio
    self._convert_audio(dst_fullpath, instance, ext[1:4])
  File "C:\Users\Sebastian\Envs\blog\lib\site-packages\audiofield\fields.py", line 140, in _convert_audio
    response = subprocess.Popen(command.split(' '), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "C:\Python36\Lib\subprocess.py", line 707, in __init__
    restore_signals, start_new_session)
  File "C:\Python36\Lib\subprocess.py", line 992, in _execute_child
    startupinfo)


[WinError 2] FileNotFoundError

音频文件实际上是按照settings.py中的指定保存在项目根目录的media目录中 不知道在哪里寻找。尚未找到类似的主题以及解决此问题的方法...

0 个答案:

没有答案