Hello I get this message when I try to make a production order. “Server Error: Please check your server logs or contact tech support.” and then it gives me all this code:
Traceback (innermost last):
File “/home/frappe/press/benches/1504280937/apps/frappe/frappe/desk/form/save.py”, line 18, in savedocs
doc.save()
File “/home/frappe/press/benches/1504280937/apps/frappe/frappe/model/document.py”, line 238, in save
self.run_post_save_methods()
File “/home/frappe/press/benches/1504280937/apps/frappe/frappe/model/document.py”, line 563, in run_post_save_methods
self.run_method(“on_submit”)
File “/home/frappe/press/benches/1504280937/apps/frappe/frappe/model/document.py”, line 508, in run_method
return Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/press/benches/1504280937/apps/frappe/frappe/model/document.py”, line 621, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/press/benches/1504280937/apps/frappe/frappe/model/document.py”, line 604, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/press/benches/1504280937/apps/frappe/frappe/model/document.py”, line 502, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/press/benches/1504280937/apps/erpnext/erpnext/manufacturing/doctype/production_order/production_order.py”, line 146, in on_submit
self.make_time_logs()
File “/home/frappe/press/benches/1504280937/apps/erpnext/erpnext/manufacturing/doctype/production_order/production_order.py”, line 216, in make_time_logs
self.check_operation_fits_in_working_hours(d)
File “/home/frappe/press/benches/1504280937/apps/erpnext/erpnext/manufacturing/doctype/production_order/production_order.py”, line 279, in check_operation_fits_in_working_hours
check_if_within_operating_hours(d.workstation, d.operation, d.planned_start_time, d.planned_end_time)
File “/home/frappe/press/benches/1504280937/apps/erpnext/erpnext/manufacturing/doctype/workstation/workstation.py”, line 56, in check_if_within_operating_hours
is_within_operating_hours(workstation, operation, from_datetime, to_datetime)
File “/home/frappe/press/benches/1504280937/apps/erpnext/erpnext/manufacturing/doctype/workstation/workstation.py”, line 63, in is_within_operating_hours
slot_length = (get_datetime(working_hour.end_time) - get_datetime(working_hour.start_time)).total_seconds()
TypeError: unsupported operand type(s) for -: ‘datetime.timedelta’ and ‘datetime.datetime’
Traceback (innermost last):
File “/home/frappe/press/benches/1504280937/apps/frappe/frappe/app.py”, line 51, in application
response = frappe.handler.handle()
File “/home/frappe/press/benches/1504280937/apps/frappe/frappe/handler.py”, line 62, in handle
execute_cmd(cmd)
File “/home/frappe/press/benches/1504280937/apps/frappe/frappe/handler.py”, line 85, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/frappe/press/benches/1504280937/apps/frappe/frappe/init.py”, line 734, in call
return fn(*args, **newargs)
File “/home/frappe/press/benches/1504280937/apps/frappe/frappe/desk/form/save.py”, line 18, in savedocs
doc.save()
File “/home/frappe/press/benches/1504280937/apps/frappe/frappe/model/document.py”, line 238, in save
self.run_post_save_methods()
File “/home/frappe/press/benches/1504280937/apps/frappe/frappe/model/document.py”, line 563, in run_post_save_methods
self.run_method(“on_submit”)
File “/home/frappe/press/benches/1504280937/apps/frappe/frappe/model/document.py”, line 508, in run_method
return Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/press/benches/1504280937/apps/frappe/frappe/model/document.py”, line 621, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/press/benches/1504280937/apps/frappe/frappe/model/document.py”, line 604, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/press/benches/1504280937/apps/frappe/frappe/model/document.py”, line 502, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/press/benches/1504280937/apps/erpnext/erpnext/manufacturing/doctype/production_order/production_order.py”, line 146, in on_submit
self.make_time_logs()
File “/home/frappe/press/benches/1504280937/apps/erpnext/erpnext/manufacturing/doctype/production_order/production_order.py”, line 216, in make_time_logs
self.check_operation_fits_in_working_hours(d)
File “/home/frappe/press/benches/1504280937/apps/erpnext/erpnext/manufacturing/doctype/production_order/production_order.py”, line 279, in check_operation_fits_in_working_hours
check_if_within_operating_hours(d.workstation, d.operation, d.planned_start_time, d.planned_end_time)
File “/home/frappe/press/benches/1504280937/apps/erpnext/erpnext/manufacturing/doctype/workstation/workstation.py”, line 56, in check_if_within_operating_hours
is_within_operating_hours(workstation, operation, from_datetime, to_datetime)
File “/home/frappe/press/benches/1504280937/apps/erpnext/erpnext/manufacturing/doctype/workstation/workstation.py”, line 63, in is_within_operating_hours
slot_length = (get_datetime(working_hour.end_time) - get_datetime(working_hour.start_time)).total_seconds()
TypeError: unsupported operand type(s) for -: ‘datetime.timedelta’ and ‘datetime.datetime’
Can anyone please tell me how to fix this or what I am doing wrong?