When Opening Doctype Showing Server Error

Facing Error While Opening Task Doctype

image

Attaching Screenshot of the Error
How to Rectify as User or Developer

Which version?

We checked in the latest v14 and v15 so it’s worked properly.

We Currently Using Version 14.62.4

I’m Providing Detail Below for Reference

Traceback (most recent call last):
File “apps/frappe/frappe/utils/data.py”, line 125, in get_datetime
return datetime.datetime.strptime(datetime_str, DATETIME_FORMAT)
File “/usr/lib/python3.10/_strptime.py”, line 568, in _strptime_datetime
tt, fraction, gmtoff_fraction = _strptime(data_string, format)
File “/usr/lib/python3.10/_strptime.py”, line 349, in _strptime
raise ValueError(“time data %r does not match format %r” %
ValueError: time data ‘0’ does not match format ‘%Y-%m-%d %H:%M:%S.%f’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “env/lib/python3.10/site-packages/dateutil/parser/_parser.py”, line 649, in parse
ret = self._build_naive(res, default)
File “env/lib/python3.10/site-packages/dateutil/parser/_parser.py”, line 1235, in _build_naive
naive = default.replace(**repl)
ValueError: day is out of range for month

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “apps/frappe/frappe/app.py”, line 95, in application
response = frappe.api.handle()
File “apps/frappe/frappe/api.py”, line 55, in handle
return frappe.handler.handle()
File “apps/frappe/frappe/handler.py”, line 47, in handle
data = execute_cmd(cmd)
File “apps/frappe/frappe/handler.py”, line 85, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “apps/frappe/frappe/init.py”, line 1603, in call
return fn(*args, **newargs)
File “apps/frappe/frappe/init.py”, line 801, in wrapper_fn
retval = fn(*args, **get_newargs(fn, kwargs))
File “apps/frappe/frappe/desk/notifications.py”, line 293, in get_open_count
external_links_data_for_d = get_external_links(d, name, links)
File “apps/frappe/frappe/desk/notifications.py”, line 342, in get_external_links
frappe.get_all(
File “apps/frappe/frappe/init.py”, line 1922, in get_all
return get_list(doctype, *args, **kwargs)
File “apps/frappe/frappe/init.py”, line 1894, in get_list
return frappe.model.db_query.DatabaseQuery(doctype).execute(*args, **kwargs)
File “apps/frappe/frappe/model/db_query.py”, line 190, in execute
result = self.build_and_run()
File “apps/frappe/frappe/model/db_query.py”, line 205, in build_and_run
args = self.prepare_args()
File “apps/frappe/frappe/model/db_query.py”, line 248, in prepare_args
self.build_conditions()
File “apps/frappe/frappe/model/db_query.py”, line 586, in build_conditions
self.build_filter_conditions(self.filters, self.conditions)
File “apps/frappe/frappe/model/db_query.py”, line 607, in build_filter_conditions
conditions.append(self.prepare_filter_condition(f))
File “apps/frappe/frappe/model/db_query.py”, line 730, in prepare_filter_condition
f = get_filter(self.doctype, f, additional_filters_config)
File “apps/frappe/frappe/utils/data.py”, line 1828, in get_filter
meta = frappe.get_meta(f.doctype)
File “apps/frappe/frappe/init.py”, line 1213, in get_meta
return frappe.model.meta.get_meta(doctype, cached=cached)
File “apps/frappe/frappe/model/meta.py”, line 65, in get_meta
meta = Meta(doctype)
File “apps/frappe/frappe/model/meta.py”, line 119, in init
self.process()
File “apps/frappe/frappe/model/meta.py”, line 138, in process
self.apply_property_setters()
File “apps/frappe/frappe/model/meta.py”, line 387, in apply_property_setters
d.set(ps.property, cast(ps.property_type, ps.value))
File “apps/frappe/frappe/utils/data.py”, line 877, in cast
value = get_datetime(value)
File “apps/frappe/frappe/utils/data.py”, line 127, in get_datetime
return parser.parse(datetime_str)
File “env/lib/python3.10/site-packages/dateutil/parser/_parser.py”, line 1368, in parse
return DEFAULTPARSER.parse(timestr, **kwargs)
File “env/lib/python3.10/site-packages/dateutil/parser/_parser.py”, line 651, in parse
six.raise_from(ParserError(str(e) + “: %s”, timestr), e)
File “”, line 3, in raise_from
dateutil.parser._parser.ParserError: day is out of range for month: 0

### Request Data

{
“type”: “GET”,
“args”: {
“doctype”: “Project”,
“name”: “TIMB-PROJ-145”,
“items”: “["Task","Timesheet","Issue","Project Update","Material Request","BOM","Stock Entry","Sales Order","Delivery Note","Sales Invoice","Purchase Order","Purchase Receipt","Purchase Invoice","Expense Claim"]”
},
“headers”: {},
“error_handlers”: {},
“url”: “/api/method/frappe.desk.notifications.get_open_count”
}

### Response Data

{
“exception”: “dateutil.parser._parser.ParserError: day is out of range for month: 0”
}

Hi @RajeshV,

We checked on the latest version 14 but we haven’t found any type of issue.

Please upgrade your version and check it.

Thank You!

1 Like

File “apps/frappe/frappe/model/meta.py”, line 138, in process
self.apply_property_setters()
File “apps/frappe/frappe/model/meta.py”, line 387, in apply_property_setters
d.set(ps.property, cast(ps.property_type, ps.value))
File “apps/frappe/frappe/utils/data.py”, line 877, in cast
value = get_datetime(value)
File “apps/frappe/frappe/utils/data.py”, line 127, in get_datetime
return parser.parse(datetime_str)
File “env/lib/python3.10/site-packages/dateutil/parser/_parser.py”, line 1368, in parse
return DEFAULTPARSER.parse(timestr, **kwargs)
File “env/lib/python3.10/site-packages/dateutil/parser/_parser.py”, line 651, in parse
six.raise_from(ParserError(str(e) + “: %s”, timestr), e)
File “”, line 3, in raise_from
dateutil.parser._parser.ParserError: day is out of range for month: 0

You have added some invalid value using customize form. Go to property setter and see if there’s any value with date/datetime fieldtype but specifying some incorrect value for it instead.

1 Like

@ankush @NCP

The Error Cleared, we made mistake on property setter “property_type” -‘Datetime’ Instead of ‘Check’

Thanks @ankush