Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/312.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python I';当使用dropbox作为django存储时,我收到一个ApiError_Python_Django_Django Templates_Dropbox_Dropbox Api - Fatal编程技术网

Python I';当使用dropbox作为django存储时,我收到一个ApiError

Python I';当使用dropbox作为django存储时,我收到一个ApiError,python,django,django-templates,dropbox,dropbox-api,Python,Django,Django Templates,Dropbox,Dropbox Api,我使用dropbox作为django存储来提供媒体文件,当上传到dropbox时,所有文件都正常工作,正如预期的那样上传到根目录,但上传的图像不会在模板上呈现 显示的错误 ApiError at /index ApiError('304328f4c8384ce99352fc8e9c338f71', GetTemporaryLinkError('path', LookupError('not_found', None))) Request Method: GET Request URL: h

我使用dropbox作为django存储来提供媒体文件,当上传到dropbox时,所有文件都正常工作,正如预期的那样上传到根目录,但上传的图像不会在模板上呈现

显示的错误

ApiError at /index
ApiError('304328f4c8384ce99352fc8e9c338f71', GetTemporaryLinkError('path', LookupError('not_found', None)))
Request Method: GET
Request URL:    http://127.0.0.1:8000/index
Django Version: 3.1.2
Exception Type: ApiError
Exception Value:    
ApiError('304328f4c8384ce99352fc8e9c338f71', GetTemporaryLinkError('path', LookupError('not_found', None)))
Exception Location: /home/raam124/.local/share/virtualenvs/rattota-GtEiaCOf/lib/python3.8/site-packages/dropbox/dropbox.py, line 337, in request
Python Executable:  /home/raam124/.local/share/virtualenvs/rattota-GtEiaCOf/bin/python
Python Version: 3.8.5
Python Path:    
['/home/raam124/Documents/rattota',
 '/usr/lib/python38.zip',
 '/usr/lib/python3.8',
 '/usr/lib/python3.8/lib-dynload',
 '/home/raam124/.local/share/virtualenvs/rattota-GtEiaCOf/lib/python3.8/site-packages']
Server time:    Fri, 23 Oct 2020 10:02:16 +0000

我的静态和媒体文件设置

    os.path.join(BASE_DIR, "static"),
    os.path.join(BASE_DIR, "media"),
]
STATIC_URL = '/static/'
MEDIA_URL = '/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static_cdn')
MEDIA_ROOT = os.path.join(BASE_DIR, 'media_cdn') 

我的dropbox存储设置


DEFAULT_FILE_STORAGE = 'storages.backends.dropbox.DropBoxStorage'

DROPBOX_OAUTH2_TOKEN = 'token here'

DROPBOX_ROOT_PATH = '/'

我正在使用

<img alt="" class="card-img img-fluid geeks" src="{{topstory.image.url}}" />