Error on "Transfer Materials for Manufacture"

I get this error on a production order when I click “Transfer Materials for Manufacture” … it essentially breaks the entire Production order and I cannot delete/remove it. I have filled in all the data values on the Time section, so I don’t know where month is missing (per the error)

Traceback (innermost last):

File “/home/erpnext/frappe-bench/apps/frappe/frappe/desk/form/load.py”, line 31, in getdoc
doc = frappe.get_doc(doctype, name)
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/load.py”, line 31, in getdoc
doc = frappe.get_doc(doctype, name)
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

Can you share a screenshot of your Stock Entry

Thats a Stock Entry, you said you had the error in Production Order.

Here you go (you had asked for Stock Entry) … this is a brand new one I just made and it does the same error

@ryarrow we are really not able to replicate this but it seems like other users have also got this error. If you can please create a test user for us and share the login details on a Private Message. We would like to check this us.

I would if I could – I am using the VM locally for this.

Was there ever any further resolution of this issue?

We have been testing locally before doing all this on our live installation but are still stuck on this part of the process. I had a coworker setup a whole new VM and do all the same things on their own separate from me and the error happens again. They create Material Request, items are in stock, we made a production order with a BOM and then when we hit transfer materials the error is generated.

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

Additionally, we cannot delete the production order after it has been submitted. It produces a similar error 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/reportview.py", line 134, in delete_items
    frappe.delete_doc(doctype, d)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py", line 501, in delete_doc
    ignore_permissions, flags)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/model/delete_doc.py", line 59, in delete_doc
    doc = frappe.get_doc(doctype, name)
  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

Ah, I see others are in the same boat - Error when try to submit Production order

@ryarrow this seems a difficult error to catch. Is your erpnext instance updated?