Try ERPNext Buy Support Partners Foundation

Dropbox Upload Failed

Hi ERPNEXT Community,

I am currently running ERPNEXT v12 on my own server. I am facing the issue of uploading backup to Dropbox.

I have set up and allowed Dropbox access properly. Everything seemed to work just fine. However, whenever I click Take Backup Now, it shows me this error message:

Error message:

    Traceback (most recent call last):
      File "/home/erpnext/bench/env/lib/python3.6/site-packages/urllib3/connectionpool.py", line 421, in _make_request
        six.raise_from(e, None)
      File "", line 3, in raise_from
      File "/home/erpnext/bench/env/lib/python3.6/site-packages/urllib3/connectionpool.py", line 416, in _make_request
        httplib_response = conn.getresponse()
      File "/usr/lib/python3.6/http/client.py", line 1346, in getresponse
        response.begin()
      File "/usr/lib/python3.6/http/client.py", line 307, in begin
        version, status, reason = self._read_status()
      File "/usr/lib/python3.6/http/client.py", line 268, in _read_status
        line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
      File "/usr/lib/python3.6/socket.py", line 586, in readinto
        return self._sock.recv_into(b)
      File "/home/erpnext/bench/env/lib/python3.6/site-packages/urllib3/contrib/pyopenssl.py", line 326, in recv_into
        raise timeout("The read operation timed out")
    socket.timeout: The read operation timed out

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/home/erpnext/bench/env/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
        timeout=timeout
      File "/home/erpnext/bench/env/lib/python3.6/site-packages/urllib3/connectionpool.py", line 720, in urlopen
        method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
      File "/home/erpnext/bench/env/lib/python3.6/site-packages/urllib3/util/retry.py", line 400, in increment
        raise six.reraise(type(error), error, _stacktrace)
      File "/home/erpnext/bench/env/lib/python3.6/site-packages/urllib3/packages/six.py", line 735, in reraise
        raise value
      File "/home/erpnext/bench/env/lib/python3.6/site-packages/urllib3/connectionpool.py", line 672, in urlopen
        chunked=chunked,
      File "/home/erpnext/bench/env/lib/python3.6/site-packages/urllib3/connectionpool.py", line 423, in _make_request
        self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
      File "/home/erpnext/bench/env/lib/python3.6/site-packages/urllib3/connectionpool.py", line 331, in _raise_timeout
        self, url, "Read timed out. (read timeout=%s)" % timeout_value
    urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='content.dropboxapi.com', port=443): Read timed out. (read timeout=30)

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/home/erpnext/bench/apps/frappe/frappe/integrations/doctype/dropbox_settings/dropbox_settings.py", line 51, in take_backup_to_dropbox
        did_not_upload, error_log = backup_to_dropbox(upload_db_backup)
      File "/home/erpnext/bench/apps/frappe/frappe/integrations/doctype/dropbox_settings/dropbox_settings.py", line 119, in backup_to_dropbox
        upload_file_to_dropbox(filename, "/database", dropbox_client)
      File "/home/erpnext/bench/apps/frappe/frappe/integrations/doctype/dropbox_settings/dropbox_settings.py", line 195, in upload_file_to_dropbox
        upload_session_start_result = dropbox_client.files_upload_session_start(f.read(chunk_size))
      File "/home/erpnext/bench/env/lib/python3.6/site-packages/dropbox/base.py", line 2487, in files_upload_session_start
        f,
      File "/home/erpnext/bench/env/lib/python3.6/site-packages/dropbox/dropbox.py", line 274, in request
        timeout=timeout)
      File "/home/erpnext/bench/env/lib/python3.6/site-packages/dropbox/dropbox.py", line 365, in request_json_string_with_retry
        timeout=timeout)
      File "/home/erpnext/bench/env/lib/python3.6/site-packages/dropbox/dropbox.py", line 449, in request_json_string
        timeout=timeout,
      File "/home/erpnext/bench/env/lib/python3.6/site-packages/requests/sessions.py", line 581, in post
        return self.request('POST', url, data=data, json=json, **kwargs)
      File "/home/erpnext/bench/env/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
        resp = self.send(prep, **send_kwargs)
      File "/home/erpnext/bench/env/lib/python3.6/site-packages/requests/sessions.py", line 646, in send
        r = adapter.send(request, **kwargs)
      File "/home/erpnext/bench/env/lib/python3.6/site-packages/requests/adapters.py", line 529, in send
        raise ReadTimeout(e, request=request)
    requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='content.dropboxapi.com', port=443): Read timed out. (read timeout=30)

Any idea how I can resolve this?

Same Issue here