Maximum Attachment Limit

Queue / Worker Job Created
default
Import on 04-09-2021 15:01:31
Traceback (most recent call last):
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/rq/worker.py”, line 1013, in perform_job
rv = job.perform()
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/rq/job.py”, line 709, in perform
self._result = self._execute()
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/rq/job.py”, line 732, in _execute
result = self.func(*self.args, **self.kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py”, line 99, in execute_job
method(**kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/data_import_legacy/importer.py”, line 503, in upload
_file.save()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 285, in save
return self._save(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 307, in save
self.insert()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 238, in insert
self.run_before_save_methods()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 963, in run_before_save_methods
self.run_method(“validate”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 861, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1153, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1136, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 855, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/file/file.py”, line 96, in validate
self.validate_attachment_limit()
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/file/file.py”, line 198, in validate_attachment_limit
title=
(‘Attachment Limit Reached’)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 432, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’, is_minimizable=is_minimizable, wide=wide, as_list=as_list)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 411, in msgprint
_raise_exception()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 365, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.AttachmentLimitReached: Maximum Attachment Limit of 1 has been reached for Data Import Legacy Import on 04-09-2021 15:01:31.
04-09-2021 15:03:21
default
Import on 04-09-2021 15:30:20
Traceback (most recent call last):
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/rq/worker.py”, line 1013, in perform_job
rv = job.perform()
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/rq/job.py”, line 709, in perform
self._result = self._execute()
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/rq/job.py”, line 732, in _execute
result = self.func(*self.args, **self.kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py”, line 99, in execute_job
method(**kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/data_import_legacy/importer.py”, line 503, in upload
_file.save()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 285, in save
return self._save(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 307, in save
self.insert()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 238, in insert
self.run_before_save_methods()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 963, in run_before_save_methods
self.run_method(“validate”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 861, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1153, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1136, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 855, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/file/file.py”, line 96, in validate
self.validate_attachment_limit()
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/file/file.py”, line 198, in validate_attachment_limit
title=
(‘Attachment Limit Reached’)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 432, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’, is_minimizable=is_minimizable, wide=wide, as_list=as_list)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 411, in msgprint
_raise_exception()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 365, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.AttachmentLimitReached: Maximum Attachment Limit of 1 has been reached for Data Import Legacy Import on 04-09-2021 15:30:20.
04-09-2021 15:30:49
default
frappe.desk.doctype.notification_log.notification_log.make_notification_logs
Traceback (most recent call last):
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/rq/worker.py”, line 1013, in perform_job
rv = job.perform()
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/rq/job.py”, line 709, in perform
self._result = self._execute()
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/rq/job.py”, line 732, in _execute
result = self.func(*self.args, **self.kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py”, line 99, in execute_job
method(**kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/doctype/notification_log/notification_log.py”, line 73, in make_notification_logs
_doc.insert(ignore_permissions=True)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 259, in insert
self.run_method(“after_insert”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 861, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1153, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1136, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 855, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/doctype/notification_log/notification_log.py”, line 16, in after_insert
send_notification_email(self)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/doctype/notification_log/notification_log.py”, line 98, in send_notification_email
now=frappe.flags.in_test
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 540, in sendmail
inline_images=inline_images, header=header, print_letterhead=print_letterhead, with_container=with_container)
File “/home/frappe/frappe-bench/apps/frappe/frappe/email/queue.py”, line 76, 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 90, in get_outgoing_email_account
frappe.OutgoingEmailError)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 432, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’, is_minimizable=is_minimizable, wide=wide, as_list=as_list)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 411, in msgprint
_raise_exception()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 365, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.OutgoingEmailError: Please setup default Email Account from Setup > Email > Email Account
04-09-2021 19:14:10
default
frappe.sessions.clear_expired_sessions
Traceback (most recent call last):
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/rq/worker.py”, line 1013, in perform_job
rv = job.perform()
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/rq/job.py”, line 709, in perform
self._result = self._execute()
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/rq/job.py”, line 732, in _execute
result = self.func(*self.args, **self.kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py”, line 129, in execute_job
frappe.db.commit()
File “/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py”, line 751, in commit
self.sql(“commit”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py”, line 151, in sql
self._cursor.execute(query)
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/pymysql/cursors.py”, line 148, in execute
result = self._query(query)
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/pymysql/cursors.py”, line 310, in _query
conn.query(q)
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py”, line 547, in query
self._execute_command(COMMAND.COM_QUERY, sql)
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py”, line 793, in _execute_command
raise err.InterfaceError(0, “”)
pymysql.err.InterfaceError: (0, ‘’)
09-09-2021 00:04:42
default
Import on 09-09-2021 06:46:21
Traceback (most recent call last):
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/rq/worker.py”, line 1013, in perform_job
rv = job.perform()
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/rq/job.py”, line 709, in perform
self._result = self._execute()
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/rq/job.py”, line 732, in _execute
result = self.func(*self.args, **self.kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py”, line 99, in execute_job
method(**kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/data_import_legacy/importer.py”, line 503, in upload
_file.save()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 285, in save
return self._save(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 307, in save
self.insert()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 238, in insert
self.run_before_save_methods()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 963, in run_before_save_methods
self.run_method(“validate”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 861, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1153, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1136, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 855, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/file/file.py”, line 96, in validate
self.validate_attachment_limit()
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/file/file.py”, line 198, in validate_attachment_limit
title=
(‘Attachment Limit Reached’)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 432, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’, is_minimizable=is_minimizable, wide=wide, as_list=as_list)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 411, in msgprint
_raise_exception()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 365, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.AttachmentLimitReached: Maximum Attachment Limit of 1 has been reached for Data Import Legacy Import on 09-09-2021 06:46:21.

@Jermaine_Gray I am NOT a qualified Dev, so be careful here…:

That seems like a good limit to have. (Probably wouldn’t want to be importing more than one file at a time…)

It makes me think that you might be trying to re-use an import? I always just begin a new Import process.

Maybe if you add a little more explanation we can figure out why you are having trouble.

What action were you doing when you got these errors?

By looking at the log details you posted, it seems you have reached the maximum number of attachments for a document. This discussion seems to be similar to your problem and may help you.

You have to go to Customize Form for the doctype you are having this problem, and change the limit.