ERPNext.com Frappe Cloud Support Partners Foundation Frappe School

Dropbox backup error ERPNext v12

Hi,
I set up an app on Dropbox, copied app keys and allowed Dropbox but backup does not work.
ERPNext: v12.22.0 (version-12)
Frappe Framework: v12.19.2 (version-12)
Ubuntu 18.04 LTS x64 on VM.
Here’s error log.

{'method_name': 'frappe.integrations.doctype.dropbox_settings.dropbox_settings.take_backup_to_dropbox', 'log': <function log at 0x7f473a8719d8>, 'retry': 0, 'is_async': True, 'user': 'mymail', 'kwargs': {}, 'job_name': 'frappe.integrations.doctype.dropbox_settings.dropbox_settings.take_backup_to_dropbox', 'event': None, 'method': <function take_backup_to_dropbox at 0x7f47392e9ea0>, 'site': 'site1.local'}
Traceback (most recent call last):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/integrations/doctype/dropbox_settings/dropbox_settings.py", line 55, in take_backup_to_dropbox
    did_not_upload, error_log = backup_to_dropbox(upload_db_backup)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/integrations/doctype/dropbox_settings/dropbox_settings.py", line 102, in backup_to_dropbox
    upload_file_to_dropbox(filename, "/database", dropbox_client)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/integrations/doctype/dropbox_settings/dropbox_settings.py", line 165, in upload_file_to_dropbox
    create_folder_if_not_exists(folder, dropbox_client)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/integrations/doctype/dropbox_settings/dropbox_settings.py", line 198, in create_folder_if_not_exists
    dropbox_client.files_get_metadata(folder)
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/dropbox/base.py", line 1277, in files_get_metadata
    None,
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/dropbox/dropbox.py", line 274, in request
    timeout=timeout)
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/dropbox/dropbox.py", line 365, in request_json_string_with_retry
    timeout=timeout)
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/dropbox/dropbox.py", line 462, in request_json_string
    AuthError_validator, r.json()['error'])
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/dropbox/stone_serializers.py", line 981, in json_compat_obj_decode
    data_type, obj)
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/dropbox/stone_serializers.py", line 565, in json_compat_obj_decode_helper
    return self.decode_union(data_type, obj)
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/dropbox/stone_serializers.py", line 661, in decode_union
    data_type, obj)
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/dropbox/stone_serializers.py", line 679, in decode_union_dict
    raise bv.ValidationError("unknown tag '%s'" % tag)
dropbox.stone_validators.ValidationError: unknown tag 'missing_scope'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 102, in execute_job
    method(**kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/integrations/doctype/dropbox_settings/dropbox_settings.py", line 74, in take_backup_to_dropbox
    send_email(False, "Dropbox", "Dropbox Settings", "send_notifications_to", error_message)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/integrations/offsite_backup_utils.py", line 42, in send_email
    frappe.sendmail(recipients=recipients, subject=subject, message=message)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 492, in sendmail
    inline_images=inline_images, header=header, print_letterhead=print_letterhead)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/email/queue.py", line 77, in send
    email_account = get_outgoing_email_account(True, append_to=reference_doctype, sender=sender)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/email/smtp.py", line 85, in get_outgoing_email_account
    frappe.OutgoingEmailError)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 380, in throw
    msgprint(msg, raise_exception=exc, title=title, indicator='red', is_minimizable=is_minimizable)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 359, in msgprint
    _raise_exception()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 319, in _raise_exception
    raise raise_exception(msg)
frappe.exceptions.OutgoingEmailError: Please setup default Email Account from Setup > Email > Email Account

Anyone?

You have to setup email notification.

Don’t have to.
Already did same thing on local machine in firm, backups without any problems.
I did same steps here and it does not work.