Error when try to submit Production order

Hi,
I am new to this system and i just started a new manufacturing company. I had a plan to automate my system & i had tried this software. My clarification is when i try to submit a “Production Order” its showing the following error. Please help me out in this and how to rectify the same.

Note: I am not aware of any coding knowledge. I just copied the error message displayed and pasted the same below

Route

Form/Production Order/PRO-00001
Error Report

Traceback (innermost last):
File “/home/erpnext/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 18, in savedocs
doc.save()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 238, in save
self.run_post_save_methods()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 561, in run_post_save_methods
self.run_method(“on_submit”)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 506, in run_method
return Document.hook(fn)(self, *args, **kwargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 619, in composer
return composed(self, method, *args, **kwargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 602, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 500, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/erpnext/frappe-bench/apps/erpnext/erpnext/manufacturing/doctype/production_order/production_order.py”, line 146, in on_submit
self.make_time_logs()
File “/home/erpnext/frappe-bench/apps/erpnext/erpnext/manufacturing/doctype/production_order/production_order.py”, line 222, in make_time_logs
time_log.save()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 214, in save
self.insert()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 176, in insert
self.run_before_save_methods()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 540, in run_before_save_methods
self.run_method(“validate”)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 506, in run_method
return Document.hook(fn)(self, *args, **kwargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 619, in composer
return composed(self, method, *args, **kwargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 602, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 500, in
fn = lambda self, *args, **kwargs: getattr(self, method)(args, **kwargs)
File “/home/erpnext/frappe-bench/apps/erpnext/erpnext/projects/doctype/time_log/time_log.py”, line 26, in validate
self.validate_manufacturing()
File “/home/erpnext/frappe-bench/apps/erpnext/erpnext/projects/doctype/time_log/time_log.py”, line 198, in validate_manufacturing
production_order = frappe.get_doc(“Production Order”, self.production_order)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/init.py”, line 470, in get_doc
return frappe.model.document.get_doc(arg1, arg2)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 45, in get_doc
return controller(arg1, arg2)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 76, in init
self.load_from_db()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 104, in load_from_db
d = frappe.db.get_value(self.doctype, self.name, "
", as_dict=1)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/database.py”, line 390, in get_value
ret = self.get_values(doctype, filters, fieldname, ignore, as_dict, debug)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/database.py”, line 425, in get_values
return self._get_values_from_table(fields, filters, doctype, as_dict, debug, order_by, update)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/database.py”, line 516, in _get_values_from_table
conditions, order_by), values, as_dict=as_dict, debug=debug, update=update)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/database.py”, line 129, in sql
self._cursor.execute(query, values)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
ValueError: month must be in 1…12

Traceback (innermost last):
File “/home/erpnext/frappe-bench/apps/frappe/frappe/app.py”, line 51, in application
response = frappe.handler.handle()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py”, line 62, in handle
execute_cmd(cmd)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py”, line 85, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/init.py”, line 718, in call
return fn(*args, **newargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 18, in savedocs
doc.save()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 238, in save
self.run_post_save_methods()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 561, in run_post_save_methods
self.run_method(“on_submit”)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 506, in run_method
return Document.hook(fn)(self, *args, **kwargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 619, in composer
return composed(self, method, *args, **kwargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 602, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 500, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/erpnext/frappe-bench/apps/erpnext/erpnext/manufacturing/doctype/production_order/production_order.py”, line 146, in on_submit
self.make_time_logs()
File “/home/erpnext/frappe-bench/apps/erpnext/erpnext/manufacturing/doctype/production_order/production_order.py”, line 222, in make_time_logs
time_log.save()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 214, in save
self.insert()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 176, in insert
self.run_before_save_methods()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 540, in run_before_save_methods
self.run_method(“validate”)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 506, in run_method
return Document.hook(fn)(self, *args, **kwargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 619, in composer
return composed(self, method, *args, **kwargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 602, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 500, in
fn = lambda self, *args, **kwargs: getattr(self, method)(args, **kwargs)
File “/home/erpnext/frappe-bench/apps/erpnext/erpnext/projects/doctype/time_log/time_log.py”, line 26, in validate
self.validate_manufacturing()
File “/home/erpnext/frappe-bench/apps/erpnext/erpnext/projects/doctype/time_log/time_log.py”, line 198, in validate_manufacturing
production_order = frappe.get_doc(“Production Order”, self.production_order)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/init.py”, line 470, in get_doc
return frappe.model.document.get_doc(arg1, arg2)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 45, in get_doc
return controller(arg1, arg2)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 76, in init
self.load_from_db()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 104, in load_from_db
d = frappe.db.get_value(self.doctype, self.name, "
", as_dict=1)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/database.py”, line 390, in get_value
ret = self.get_values(doctype, filters, fieldname, ignore, as_dict, debug)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/database.py”, line 425, in get_values
return self._get_values_from_table(fields, filters, doctype, as_dict, debug, order_by, update)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/database.py”, line 516, in _get_values_from_table
conditions, order_by), values, as_dict=as_dict, debug=debug, update=update)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/database.py”, line 129, in sql
self._cursor.execute(query, values)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
ValueError: month must be in 1…12
Request Data

{
“type”: “POST”,
“args”: {
“doc”: “{"use_multi_level_bom":0,"operations":[{"status":"Pending","planned_operating_cost":310.8,"description":"Production of finished producct","parent":"PRO-00001","creation":"2015-07-08 13:01:07.315047","modified":"2015-07-08 13:02:37.540459","actual_end_time":null,"actual_operating_cost":0,"owner":"snct83@gmail.com","actual_operation_time":null,"operation":"Production","actual_start_time":null,"workstation":"Production","modified_by":"snct83@gmail.com","name":"95b0545c7d","idx":1,"doctype":"Production Order Operation","parenttype":"Production Order","planned_start_time":null,"completed_qty":null,"docstatus":0,"parentfield":"operations","planned_end_time":null,"time_in_mins":18,"hour_rate":1036}],"additional_operating_cost":null,"naming_series":"PRO-","creation":"2015-07-08 13:01:07.315047","produced_qty":0,"qty":30000,"modified":"2015-07-08 13:02:37.540459","owner":"snct83@gmail.com","localname":"New Production Order 1","fg_warehouse":"Finished Goods - KNAPS","planned_end_date":null,"modified_by":"snct83@gmail.com","material_transferred_for_manufacturing":0,"total_operating_cost":310.8,"actual_end_date":"","amended_from":null,"stock_uom":"Nos","docstatus":0,"status":"Draft","project_name":null,"planned_operating_cost":310.8,"description":null,"parent":null,"company":"Kongunadu Agro Products","production_item":"IE16440","planned_start_date":null,"actual_start_date":"","actual_operating_cost":0,"name":"PRO-00001","expected_delivery_date":null,"bom_no":"BOM/IE16440/001","idx":null,"wip_warehouse":"Work In Progress - KNAPS","sales_order":null,"doctype":"Production Order","parenttype":null,"parentfield":null,"__last_sync_on":"2015-07-08T07:32:38.666Z"}”,
“action”: “Submit”,
“cmd”: “frappe.desk.form.save.savedocs”,
“_type”: “POST”
},
“btn”: {},
“freeze”: true,
“freeze_message”: “Submitting”,
“url”: “/”
}
Response JSON

{
“_server_messages”: “["Did not save"]”
}

Seems like you have a wrong date value.

Hi,

Thanks for the reply, can you please explain which date i need to check. Is it the production date or some other?

Thanks in Advance

Hi rmehta,

I get this error as well. I have tried many options to get rid of it. Including create a new instance of the application and go through the process all over. However, the same error is reported when I place my Production Order. I tried to recreate this in the demo site but works pretty fine.

I am doubting this to have problems with the VM hosted server.

I have changed the date formats to check if this issue resolves. Can you please help.

Thanks,
Prashanth

@prashanth please update your VM then.

Can’t fix if we can’t replicate.

@rmehta- What are the updates that you would suggest. I downloaded the vm just 2 days back from the link provided in your download section.

However, I will try to check if I can get a machine with fresh Linux and then install.

Thanks,
Prashanth

Update - I also tried downgrading my VM from 5.0.0 to 4.3.30 but the same issue persists.

I think Planned Start Date is not populating in your case, which is populating error. By default it should set todays date, even if you did not enter any value.

What do we do to populate planned start date? Any setting to be changed on VM or application?

Check if default value for the “Planned Start Date” is set as “now”?

Thank you for the response.

I tried by giving a value for Planned start date, Planned End Date and
Expected Delivery Date as shown in screenshot below. However, I get the
same error on clicking on “Transfer Materials for Manufacture” as displayed
in the next log extract.

[image: Inline image 1]

Traceback (innermost last):
File “/home/erpnext/frappe-bench/apps/frappe/frappe/app.py”, line
51, in application
response = frappe.handler.handle()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py”,
line 62, in handle
execute_cmd(cmd)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py”,
line 85, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/init.py”,
line 718, in call
return fn(args, **newargs)
File “/home/erpnext/frappe-bench/apps/erpnext/erpnext/manufacturing/doctype/production_order/production_order.py”,
line 326, in make_stock_entry
production_order = frappe.get_doc(“Production Order”, production_order_id)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/init.py”,
line 470, in get_doc
return frappe.model.document.get_doc(arg1, arg2)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”,
line 45, in get_doc
return controller(arg1, arg2)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”,
line 76, in init
self.load_from_db()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”,
line 104, in load_from_db
d = frappe.db.get_value(self.doctype, self.name, "
", as_dict=1)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/database.py”,
line 390, in get_value
ret = self.get_values(doctype, filters, fieldname, ignore, as_dict, debug)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/database.py”,
line 425, in get_values
return self._get_values_from_table(fields, filters, doctype,
as_dict, debug, order_by, update)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/database.py”,
line 516, in _get_values_from_table
conditions, order_by), values, as_dict=as_dict, debug=debug, update=update)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/database.py”,
line 129, in sql
self._cursor.execute(query, values)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”,
line 205, in execute
self.errorhandler(self, exc, value)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”,
line 36, in defaulterrorhandler
raise errorclass, errorvalue
ValueError: month must be in 1…12

I encounter the same problem when I issue material for manufacture…

made ‘production order’–> now from Raw material inventory I am trying to issue matrial for production ‘Material Transfer for Manufacture’ for the same production order. I get this error.

Server Error: Please check your server logs or contact tech support.

Traceback (innermost last):
File “/home/erpnext/frappe-bench/apps/frappe/frappe/app.py”, line 51, in application
response = frappe.handler.handle()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py”, line 62, in handle
execute_cmd(cmd)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py”, line 85, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/init.py”, line 718, in call
return fn(args, **newargs)
File “/home/erpnext/frappe-bench/apps/erpnext/erpnext/manufacturing/doctype/production_order/production_order.py”, line 326, in make_stock_entry
production_order = frappe.get_doc(“Production Order”, production_order_id)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/init.py”, line 470, in get_doc
return frappe.model.document.get_doc(arg1, arg2)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 45, in get_doc
return controller(arg1, arg2)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 76, in init
self.load_from_db()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 104, in load_from_db
d = frappe.db.get_value(self.doctype, self.name, "
", as_dict=1)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/database.py”, line 390, in get_value
ret = self.get_values(doctype, filters, fieldname, ignore, as_dict, debug)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/database.py”, line 425, in get_values
return self._get_values_from_table(fields, filters, doctype, as_dict, debug, order_by, update)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/database.py”, line 516, in _get_values_from_table
conditions, order_by), values, as_dict=as_dict, debug=debug, update=update)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/database.py”, line 129, in sql
self._cursor.execute(query, values)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
ValueError: month must be in 1…12

Seems like a frequent issue. We will try and replicate this.

Please provide a screenshot of expanded view of Operation table. Also please provide which date format set in Setup → System Settings form.

Dear Nabinhait,

Date format is fine. It is dd-mm-yyyy.
Attacked is the whole sequence of transaction. From creating BOM to Production Order Creation.


Production Order Creation


When I try submit it, I get this pop-up Error.

Complete Error Code

Traceback (innermost last):
File “/home/erpnext/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 18, in savedocs
doc.save()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 238, in save
self.run_post_save_methods()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 561, in run_post_save_methods
self.run_method(“on_submit”)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 506, in run_method
return Document.hook(fn)(self, *args, **kwargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 619, in composer
return composed(self, method, *args, **kwargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 602, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 500, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/erpnext/frappe-bench/apps/erpnext/erpnext/manufacturing/doctype/production_order/production_order.py”, line 146, in on_submit
self.make_time_logs()
File “/home/erpnext/frappe-bench/apps/erpnext/erpnext/manufacturing/doctype/production_order/production_order.py”, line 222, in make_time_logs
time_log.save()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 214, in save
self.insert()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 176, in insert
self.run_before_save_methods()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 540, in run_before_save_methods
self.run_method(“validate”)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 506, in run_method
return Document.hook(fn)(self, *args, **kwargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 619, in composer
return composed(self, method, *args, **kwargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 602, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 500, in
fn = lambda self, *args, **kwargs: getattr(self, method)(args, **kwargs)
File “/home/erpnext/frappe-bench/apps/erpnext/erpnext/projects/doctype/time_log/time_log.py”, line 26, in validate
self.validate_manufacturing()
File “/home/erpnext/frappe-bench/apps/erpnext/erpnext/projects/doctype/time_log/time_log.py”, line 198, in validate_manufacturing
production_order = frappe.get_doc(“Production Order”, self.production_order)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/init.py”, line 470, in get_doc
return frappe.model.document.get_doc(arg1, arg2)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 45, in get_doc
return controller(arg1, arg2)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 76, in init
self.load_from_db()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 104, in load_from_db
d = frappe.db.get_value(self.doctype, self.name, "
", as_dict=1)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/database.py”, line 390, in get_value
ret = self.get_values(doctype, filters, fieldname, ignore, as_dict, debug)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/database.py”, line 425, in get_values
return self._get_values_from_table(fields, filters, doctype, as_dict, debug, order_by, update)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/database.py”, line 516, in _get_values_from_table
conditions, order_by), values, as_dict=as_dict, debug=debug, update=update)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/database.py”, line 129, in sql
self._cursor.execute(query, values)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
ValueError: month must be in 1…12

Traceback (innermost last):
File “/home/erpnext/frappe-bench/apps/frappe/frappe/app.py”, line 51, in application
response = frappe.handler.handle()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py”, line 62, in handle
execute_cmd(cmd)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py”, line 85, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/init.py”, line 718, in call
return fn(*args, **newargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 18, in savedocs
doc.save()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 238, in save
self.run_post_save_methods()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 561, in run_post_save_methods
self.run_method(“on_submit”)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 506, in run_method
return Document.hook(fn)(self, *args, **kwargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 619, in composer
return composed(self, method, *args, **kwargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 602, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 500, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/erpnext/frappe-bench/apps/erpnext/erpnext/manufacturing/doctype/production_order/production_order.py”, line 146, in on_submit
self.make_time_logs()
File “/home/erpnext/frappe-bench/apps/erpnext/erpnext/manufacturing/doctype/production_order/production_order.py”, line 222, in make_time_logs
time_log.save()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 214, in save
self.insert()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 176, in insert
self.run_before_save_methods()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 540, in run_before_save_methods
self.run_method(“validate”)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 506, in run_method
return Document.hook(fn)(self, *args, **kwargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 619, in composer
return composed(self, method, *args, **kwargs)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 602, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 500, in
fn = lambda self, *args, **kwargs: getattr(self, method)(args, **kwargs)
File “/home/erpnext/frappe-bench/apps/erpnext/erpnext/projects/doctype/time_log/time_log.py”, line 26, in validate
self.validate_manufacturing()
File “/home/erpnext/frappe-bench/apps/erpnext/erpnext/projects/doctype/time_log/time_log.py”, line 198, in validate_manufacturing
production_order = frappe.get_doc(“Production Order”, self.production_order)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/init.py”, line 470, in get_doc
return frappe.model.document.get_doc(arg1, arg2)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 45, in get_doc
return controller(arg1, arg2)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 76, in init
self.load_from_db()
File “/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py”, line 104, in load_from_db
d = frappe.db.get_value(self.doctype, self.name, "
", as_dict=1)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/database.py”, line 390, in get_value
ret = self.get_values(doctype, filters, fieldname, ignore, as_dict, debug)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/database.py”, line 425, in get_values
return self._get_values_from_table(fields, filters, doctype, as_dict, debug, order_by, update)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/database.py”, line 516, in _get_values_from_table
conditions, order_by), values, as_dict=as_dict, debug=debug, update=update)
File “/home/erpnext/frappe-bench/apps/frappe/frappe/database.py”, line 129, in sql
self._cursor.execute(query, values)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/erpnext/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
ValueError: month must be in 1…12

@Mubeen can you send us a link / login to your site via a Private Message. We want to dig deeper into this. We are unable to understand what is causing the problem.

@rmehta I have hosted this VM on my laptop. It can not be accessed from anywhere else except my laptop. Can not share it :frowning:

@Mubeen You can share your screen using TeamViewer. If you are interested, please share your Team Viewer login id and password via a Private Message.

Alright. I will share it with you later. Btw this problem arises only on VM hosted on laptop. I have tried same entries on VM hosted on VPS. It works fine there.

Hi,
I have same error at the time of submit of production order.


Error:-“ValueError: month must be in 1…12”
Thanks & Regards.