Dropbox error in V7.1.1

Hi,

I am getting below error. i tries to install dropbox manually also but its same.

Traceback (most recent call last):
File “/home/itwork/frappe-bench/apps/frappe/frappe/app.py”, line 55, in application
response = frappe.handler.handle()
File “/home/itwork/frappe-bench/apps/frappe/frappe/handler.py”, line 19, in handle
execute_cmd(cmd)
File “/home/itwork/frappe-bench/apps/frappe/frappe/handler.py”, line 30, in execute_cmd
method = get_attr(cmd)
File “/home/itwork/frappe-bench/apps/frappe/frappe/handler.py”, line 114, in get_attr
method = frappe.get_attr(cmd)
File “/home/itwork/frappe-bench/apps/frappe/frappe/init.py”, line 870, in get_attr
return getattr(get_module(modulename), methodname)
File “/home/itwork/frappe-bench/apps/frappe/frappe/init.py”, line 654, in get_module
return importlib.import_module(modulename)
File “/usr/lib/python2.7/importlib/init.py”, line 37, in import_module
import(name)
ImportError: No module named dropbox_integration

Can anyone help please?

Same Problem

@soae786 @mayar can you share steps to reproduce the error?

Steps to enable dropbox backup service:
Create a dropbox app then get App Key and App Secret, https://www.dropbox.com/developers/apps

Setup credentials on Dropbox Settings doctype. Click on Dropbox Settings top right corner

After settings up App key and App Secret, generate access token Allow Dropbox Access

After saving settings, Enable Dropbox Integration Service and Save a document.
After enabling service, system will take backup of files and database on daily or weekly basis as per set on Dropbox Settings page and upload it to your dropbox.

All done successfully, but when click on Take Backup Now button i get this error:
Traceback (most recent call last):
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/app.py”, line 55, in application
response = frappe.handler.handle()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/handler.py”, line 19, in handle
execute_cmd(cmd)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/handler.py”, line 30, in execute_cmd
method = get_attr(cmd)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/handler.py”, line 114, in get_attr
method = frappe.get_attr(cmd)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/init.py”, line 870, in get_attr
return getattr(get_module(modulename), methodname)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/init.py”, line 654, in get_module
return importlib.import_module(modulename)
File “/usr/lib/python2.7/importlib/init.py”, line 37, in import_module
import(name)
ImportError: No module named dropbox_integration

Fixed via https://github.com/frappe/frappe/pull/2234

So, I just have to run bench update command to rectify it…

Hi,

I updates the ERPNext and Frappe to 7.1.3. Once I click on Take Update manually, it shows update is in queue but I received below error.

Oops, your automated backup to Dropbox
failed.
Error message:

Traceback (most recent call last):
File “/home/itwork/frappe-bench/apps/frappe/frappe/integrations/doctype/dropbox_settings/dropbox_settings.py”, line 171, in take_backup_to_dropbox
did_not_upload, error_log = backup_to_dropbox()
File “/home/itwork/frappe-bench/apps/frappe/frappe/integrations/doctype/dropbox_settings/dropbox_settings.py”, line 212, in backup_to_dropbox
dropbox_client = upload_file_to_dropbox(filename, “/database”, dropbox_client)
File “/home/itwork/frappe-bench/apps/frappe/frappe/integrations/doctype/dropbox_settings/dropbox_settings.py”, line 258, in upload_file_to_dropbox
uploader.upload_chunked()
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/dropbox/client.py”, line 1182, in upload_chunked
BytesIO(self.last_block), next_chunk_size, self.offset, self.upload_id)
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/dropbox/client.py”, line 259, in upload_chunk
reply = self.rest_client.PUT(url, file_obj, headers)
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/dropbox/rest.py”, line 327, in PUT
return cls.IMPL.PUT(*n, **kw)
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/dropbox/rest.py”, line 264, in PUT
return self.request(“PUT”, url, body=body, headers=headers, raw_response=raw_response)
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/dropbox/rest.py”, line 226, in request
preload_content=False
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/urllib3/poolmanager.py”, line 248, in urlopen
response = conn.urlopen(method, u.request_uri, **kw)
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/urllib3/connectionpool.py”, line 668, in urlopen
release_conn=release_conn, **response_kw)
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/urllib3/connectionpool.py”, line 668, in urlopen
release_conn=release_conn, **response_kw)
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/urllib3/connectionpool.py”, line 668, in urlopen
release_conn=release_conn, **response_kw)
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/urllib3/connectionpool.py”, line 640, in urlopen
_stacktrace=sys.exc_info()[2])
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/urllib3/util/retry.py”, line 287, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
MaxRetryError: HTTPSConnectionPool(host=‘api-content.dropbox.com’, port=443): Max retries exceeded with url: /1/chunked_upload (Caused by ReadTimeoutError(“HTTPSConnectionPool(host=‘api-content.dropbox.com’, port=443): Read timed out. (read timeout=60.0)”,))

	Please contact your system manager for more information.

Sending backup to dropbox is fixed and work properly but dropbox backup notification email is not working, I’m not receiving notification email after dropbox backup is sent, any suggestion?

1 Like

Thanks for reporting the issue. Fixed will release this soon.

Welcome @saurabh6790

Fixed via https://github.com/frappe/frappe/pull/2336

Thanks for pushing a fix.

I just did an update so I am running on:

/home/frappe/frappe-bench$ bench version
erpnext 7.1.13
frappe 7.1.14

When I go to settings > dropbox and click Allow Dropbox Access the screen just goes grey but doesn’t show the popup allowing for authentication.

In my console I see:

Failed to load resource: the server responded with a status of 502 (Bad Gateway)

desk#Form/Dropbox%20Settings/Dropbox%20Settings:1 Uncaught SyntaxError: Unexpected token < in JSON at position 0(…)

Thank you in advance, if you need anything else from me please let me know!

@DrTrills Unfortunately not able to reproduce issue on local.

execute

bench --site sitename clear-cache``` 

And please try again.

Traceback (most recent call last):
File “/home/itwork/frappe-bench/apps/frappe/frappe/app.py”, line 55, in application
response = frappe.handler.handle()
File “/home/itwork/frappe-bench/apps/frappe/frappe/handler.py”, line 19, in handle
execute_cmd(cmd)
File “/home/itwork/frappe-bench/apps/frappe/frappe/handler.py”, line 30, in execute_cmd
method = get_attr(cmd)
File “/home/itwork/frappe-bench/apps/frappe/frappe/handler.py”, line 114, in get_attr
method = frappe.get_attr(cmd)
File “/home/itwork/frappe-bench/apps/frappe/frappe/init.py”, line 870, in get_attr
return getattr(get_module(modulename), methodname)
File “/home/itwork/frappe-bench/apps/frappe/frappe/init.py”, line 654, in get_module
return importlib.import_module(modulename)
File “/usr/lib/python2.7/importlib/init.py”, line 37, in import_module
import(name)
ImportError: No module named dropbox_backup

Getting this error now when I click on Dropbox Setting.

And below message on email.

Backup Upload FailedOops, your automated backup to Dropbox
failed.
Error message:

Traceback (most recent call last):
File “/home/itwork/frappe-bench/apps/frappe/frappe/integrations/doctype/dropbox_settings/dropbox_settings.py”, line 171, in take_backup_to_dropbox
did_not_upload, error_log = backup_to_dropbox()
File “/home/itwork/frappe-bench/apps/frappe/frappe/integrations/doctype/dropbox_settings/dropbox_settings.py”, line 212, in backup_to_dropbox
dropbox_client = upload_file_to_dropbox(filename, “/database”, dropbox_client)
File “/home/itwork/frappe-bench/apps/frappe/frappe/integrations/doctype/dropbox_settings/dropbox_settings.py”, line 258, in upload_file_to_dropbox
uploader.upload_chunked()
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/dropbox/client.py”, line 1182, in upload_chunked
BytesIO(self.last_block), next_chunk_size, self.offset, self.upload_id)
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/dropbox/client.py”, line 259, in upload_chunk
reply = self.rest_client.PUT(url, file_obj, headers)
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/dropbox/rest.py”, line 327, in PUT
return cls.IMPL.PUT(*n, **kw)
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/dropbox/rest.py”, line 264, in PUT
return self.request(“PUT”, url, body=body, headers=headers, raw_response=raw_response)
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/dropbox/rest.py”, line 226, in request
preload_content=False
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/urllib3/poolmanager.py”, line 248, in urlopen
response = conn.urlopen(method, u.request_uri, **kw)
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/urllib3/connectionpool.py”, line 668, in urlopen
release_conn=release_conn, **response_kw)
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/urllib3/connectionpool.py”, line 668, in urlopen
release_conn=release_conn, **response_kw)
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/urllib3/connectionpool.py”, line 668, in urlopen
release_conn=release_conn, **response_kw)
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/urllib3/connectionpool.py”, line 668, in urlopen
release_conn=release_conn, **response_kw)
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/urllib3/connectionpool.py”, line 595, in urlopen
chunked=chunked)
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/urllib3/connectionpool.py”, line 352, in _make_request
self.validate_conn(conn)
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/urllib3/connectionpool.py”, line 831, in validate_conn
conn.connect()
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/urllib3/connection.py”, line 289, in connect
ssl_version=resolved_ssl_version)
File "/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/urllib3/util/ssl
.py", line 320, in ssl_wrap_socket
return context.wrap_socket(sock)
File "/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/urllib3/util/ssl
.py", line 133, in wrap_socket
return wrap_socket(socket, ciphers=self.ciphers, **kwargs)
File “/usr/lib/python2.7/ssl.py”, line 487, in wrap_socket
ciphers=ciphers)
File “/usr/lib/python2.7/ssl.py”, line 243, in init
self.do_handshake()
File “/usr/lib/python2.7/ssl.py”, line 405, in do_handshake
self._sslobj.do_handshake()
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/rq/timeouts.py”, line 51, in handle_death_penalty
‘value ({0} seconds)’.format(self._timeout))
JobTimeoutException: Job exceeded maximum timeout value (300 seconds)

	Please contact your system manager for more information.

Thanks @saurabh6790, I cleared the cache/build as suggested but still the same errors.

I am seeing some errors in my error log. The most recent being:

Title: frappe.limits.update_space_usage

{'retry': 0, 'log': <function log at 0x7f157cdf1848>, 'site': u'site1.local', 'event': u'daily', 'method_name': u'frappe.limits.update_space_usage', 'method': <function update_space_usage at 0x7f1581781ed8>, 'user': u'Administrator', 'kwargs': {}, 'async': True, 'job_name': u'frappe.limits.update_space_usage'}
Traceback (most recent call last):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 61, in execute_job
    method(**kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/limits.py", line 210, in update_space_usage
    update_limits({ 'space_usage': usage })
  File "/home/frappe/frappe-bench/apps/frappe/frappe/limits.py", line 151, in update_limits
    update_site_config("limits", limits, validate=False)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/installer.py", line 293, in update_site_config
    with open(site_config_path, "w") as f:
IOError: [Errno 13] Permission denied: u'./site1.local/site_config.json' 

seems there is a permission error writing to site_config.json. I have the dropbox keys in the site_config already, maybe thats the issue?

Thanks again for your help so far!

Yes, solved by updating to latest version:

ERPNext: v7.1.15
Frappe Framework: v7.1.15

Thank you @saurabh6790

Hi,
The issue is still there in my system. I am getting below error. I am running the latest version V7.1.19 in production mode.

Backup Upload FailedOops, your automated backup to Dropbox
failed.
Error message:

Traceback (most recent call last):
File “/home/itwork/frappe-bench/apps/frappe/frappe/integrations/doctype/dropbox_settings/dropbox_settings.py”, line 171, in take_backup_to_dropbox
did_not_upload, error_log = backup_to_dropbox()
File “/home/itwork/frappe-bench/apps/frappe/frappe/integrations/doctype/dropbox_settings/dropbox_settings.py”, line 212, in backup_to_dropbox
dropbox_client = upload_file_to_dropbox(filename, “/database”, dropbox_client)
File “/home/itwork/frappe-bench/apps/frappe/frappe/integrations/doctype/dropbox_settings/dropbox_settings.py”, line 258, in upload_file_to_dropbox
uploader.upload_chunked()
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/dropbox/client.py”, line 1182, in upload_chunked
BytesIO(self.last_block), next_chunk_size, self.offset, self.upload_id)
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/dropbox/client.py”, line 259, in upload_chunk
reply = self.rest_client.PUT(url, file_obj, headers)
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/dropbox/rest.py”, line 327, in PUT
return cls.IMPL.PUT(*n, **kw)
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/dropbox/rest.py”, line 264, in PUT
return self.request(“PUT”, url, body=body, headers=headers, raw_response=raw_response)
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/dropbox/rest.py”, line 226, in request
preload_content=False
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/urllib3/poolmanager.py”, line 248, in urlopen
response = conn.urlopen(method, u.request_uri, **kw)
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/urllib3/connectionpool.py”, line 668, in urlopen
release_conn=release_conn, **response_kw)
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/urllib3/connectionpool.py”, line 668, in urlopen
release_conn=release_conn, **response_kw)
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/urllib3/connectionpool.py”, line 668, in urlopen
release_conn=release_conn, **response_kw)
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/urllib3/connectionpool.py”, line 668, in urlopen
release_conn=release_conn, **response_kw)
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/urllib3/connectionpool.py”, line 595, in urlopen
chunked=chunked)
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/urllib3/connectionpool.py”, line 352, in _make_request
self.validate_conn(conn)
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/urllib3/connectionpool.py”, line 831, in validate_conn
conn.connect()
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/urllib3/connection.py”, line 289, in connect
ssl_version=resolved_ssl_version)
File "/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/urllib3/util/ssl
.py", line 320, in ssl_wrap_socket
return context.wrap_socket(sock)
File "/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/urllib3/util/ssl
.py", line 133, in wrap_socket
return wrap_socket(socket, ciphers=self.ciphers, **kwargs)
File “/usr/lib/python2.7/ssl.py”, line 487, in wrap_socket
ciphers=ciphers)
File “/usr/lib/python2.7/ssl.py”, line 243, in init
self.do_handshake()
File “/usr/lib/python2.7/ssl.py”, line 405, in do_handshake
self._sslobj.do_handshake()
File “/home/itwork/frappe-bench/env/local/lib/python2.7/site-packages/rq/timeouts.py”, line 51, in handle_death_penalty
‘value ({0} seconds)’.format(self._timeout))
JobTimeoutException: Job exceeded maximum timeout value (300 seconds)

	Please contact your system manager for more information.

Download your backup and tell me the size of your backup in zip folder?