Error while trying to create Work Order from Production Planning Tool

Hi,

I am fairly new to the Frappe + ERPNext platform, so please bear with me.

Versions details,
ERPNext: v11.1.10
Frappe Framework: v11.1.10

This is what I tried to do,

  1. Create a new production plan
  2. Get Items From - Sales Order
  3. Entered the required filters and clicked on “Get Sales Orders”, orders were fetched - no problem here
  4. Clicked “Get Items For Work Order”, items were fetched - no problem here
  5. Checked all the following boxes
    • Include Non Stock Items
    • Ignore Existing Ordered Quantity
    • Include Subcontracted Items
  6. Clicked “Get Raw Materials For Production”, items were fetched - no problem here
    Then Save + Submit

Now, when I go to make -> Work Order, I get the following error
“Server Error: Please check your server logs or contact tech support.”

Below is the error stacktrace from the log file web.error.log

[1968] [ERROR] Error handling request /
Traceback (most recent call last):
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/gunicorn/workers/sync.py”, line 135, in handle
self.handle_request(listener, req, client, addr)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/gunicorn/workers/sync.py”, line 176, in handle_request
respiter = self.wsgi(environ, resp.start_response)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/werkzeug/local.py”, line 228, in application
return ClosingIterator(app(environ, start_response), self.cleanup)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/werkzeug/wrappers.py”, line 308, in application
resp = f(*args[:-2] + (request,))
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 87, in application
response = handle_exception(e)
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 148, in handle_exception
response = frappe.utils.response.report_error(http_status_code)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/response.py”, line 30, in report_error
frappe.errprint(frappe.utils.get_traceback())
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 278, in errprint
error_log.append({“exc”: escape_html(msg), “locals”: get_frame_locals()})
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/error.py”, line 210, in get_frame_locals
_locals.append(‘File “{}”, line {}, in {}\n{}’.format(filename, lineno, function, json.dumps(frame.f_locals, default=str, indent=4)))
File “/usr/lib/python2.7/json/init.py”, line 251, in dumps
sort_keys=sort_keys, **kw).encode(obj)
File “/usr/lib/python2.7/json/encoder.py”, line 209, in encode
chunks = list(chunks)
File “/usr/lib/python2.7/json/encoder.py”, line 434, in _iterencode
for chunk in _iterencode_dict(o, _current_indent_level):
File “/usr/lib/python2.7/json/encoder.py”, line 408, in _iterencode_dict
for chunk in chunks:
File “/usr/lib/python2.7/json/encoder.py”, line 382, in _iterencode_dict
raise TypeError(“key " + repr(key) + " is not a string”)
TypeError: key (u’FNS/0002’, u’SO-00003’, u’Finished Goods’) is not a string

I would like to get more clarity on this error, and a possible fix. Not sure why this is happening as this was my first Production Plan.

Any help is much appreciated.

I have same error

ERPNext: v11.1.17 (master)
Frappe Framework: v11.1.17 (master)

[2019-10-14 11:21:40 +0000] [15542] [ERROR] Error handling request /
Traceback (most recent call last):
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/gunicorn/workers/sync.py", line 135, in handle
    self.handle_request(listener, req, client, addr)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/gunicorn/workers/sync.py", line 176, in handle_request
    respiter = self.wsgi(environ, resp.start_response)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/werkzeug/local.py", line 228, in application
    return ClosingIterator(app(environ, start_response), self.cleanup)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/werkzeug/wrappers.py", line 308, in application
    resp = f(*args[:-2] + (request,))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 87, in application
    response = handle_exception(e)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 148, in handle_exception
    response = frappe.utils.response.report_error(http_status_code)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/response.py", line 30, in report_error
    frappe.errprint(frappe.utils.get_traceback())
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 278, in errprint
    error_log.append({"exc": escape_html(msg), "locals": get_frame_locals()})
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/error.py", line 211, in get_frame_locals
    _locals.append('File "{}", line {}, in {}\n{}'.format(filename, lineno, function, json.dumps(frame.f_locals, default=str, indent=4)))
  File "/usr/lib/python2.7/json/__init__.py", line 251, in dumps
    sort_keys=sort_keys, **kw).encode(obj)
  File "/usr/lib/python2.7/json/encoder.py", line 209, in encode
    chunks = list(chunks)
  File "/usr/lib/python2.7/json/encoder.py", line 434, in _iterencode
    for chunk in _iterencode_dict(o, _current_indent_level):
  File "/usr/lib/python2.7/json/encoder.py", line 408, in _iterencode_dict
    for chunk in chunks:
  File "/usr/lib/python2.7/json/encoder.py", line 382, in _iterencode_dict
    raise TypeError("key " + repr(key) + " is not a string")
TypeError: key (u'EPLG22', u'WW0445', u'Hlavn\xfd sklad -P') is not a string

I solved this problem. There was issue when more than one company was setted, and default manufacturing warehouse in company settings was set to warehouse in different company. But this error traceback is not very usefull. It was very hard to find problem.