When I go to naming series I get an error

Since about a month ago, i notice if i go to 'naming series I get an error instead of the list of options for teh naming series being populated.

I’m using
Installed Apps

ERPNext: v8.4.2 (master)
Frappe Framework: v8.4.0 (master)

ie Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 56, in application
response = frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 21, in handle
data = execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 52, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 920, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 80, in runserverobj
frappe.desk.form.run_method.runserverobj(method, docs=docs, dt=dt, dn=dn, arg=arg, args=args)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/run_method.py”, line 38, in runserverobj
r = doc.run_method(method, args)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 666, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 887, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 870, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 660, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/setup/doctype/naming_series/naming_series.py”, line 42, in get_transactions
“transactions”: “\n”.join([’’] + sorted(doctypes)),
TypeError: sequence item 1: expected string or Unicode, NoneType found

I need to change a sequence number for a quotation that has a duplicate quote number, so cannot now do this.

Please can anyone suggest a fix? Apart from this my server is working properly.

Seems like a customisation related issue. Do you have any custom field where doctype is blank? That can lead this type of error.

Thanks Nabim

I’ll take a look at that

Julian
PS I’m still keen on buying subscription for support on my server for 25
users.

I’ve removed all my custom fields temporarily but the problem still occurs.

ie from frappe.log

[ERROR] 2017-07-19 17:01:55,319 | /home/frappe/frappe-bench/apps/frappe/frappe/app.py:
Site: erp.elite-antennas.com
Form Dict: {
“cmd”: “runserverobj”,
“docs”: “{“modified_by”:“Administrator”,“name”:“Naming Series”,“creation”:“2017-06-08 01:34:32.566754”,“modified”:“2017-06-08 01:34:32.566754”,“doctype”:“Naming Series”,“idx”:“0”,“user_must_always_select”:0,“current_value”:0,“owner”:“Administrator”,“docstatus”:0,”__last_sync_on":“2017-07-19T17:01:52.231Z”}",
“method”: “get_transactions”
}
Request Error
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 56, in application
response = frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 21, in handle
data = execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 52, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 922, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 80, in runserverobj
frappe.desk.form.run_method.runserverobj(method, docs=docs, dt=dt, dn=dn, arg=arg, args=args)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/run_method.py”, line 38, in runserverobj
r = doc.run_method(method, args)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 666, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 887, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 870, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 660, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/setup/doctype/naming_series/naming_series.py”, line 42, in get_transactions
“transactions”: “\n”.join([’’] + sorted(doctypes)),
TypeError: sequence item 1: expected string or Unicode, NoneType found
[ERROR] 2017-07-19 17:01:55,325 | /home/frappe/frappe-bench/apps/frappe/frappe/utils/error.py:
New Exception collected with id: 2017-07-19 17:01:55.320337-195.162.106.179-269

HI @Julian_Robbins is your issue resolved. I am also facing exactly same issue. As per Nabin’s suggestion, I rechecked my doctypes but didnt find any obvious issue.

There was an issue which has been fixed in approx 2 weeks ago. Are you using the latest version?

Hi

I updated end of last week but the problem is still there.

Julian

Current version is

Installed Apps

ERPNext: v8.6.3 (master)

Frappe Framework: v8.6.2 (master)

Thanks for the response Nabin. We are on below version -
Installed Apps
ERPNext: v8.3.5 (master)
Frappe Framework: v8.3.8 (master)

I see that we have 8.6+ version out already. We installed the setup using Easy install script given in below link -

  1. Download the install script
    For Linux:
    wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py.

Now everything went fine while installing production setup through this script , till I actually started running Bench update to update my code base. It constantly gives me an error saying that I have uncommited changes in ERPNext App and Bench App. When I ran git status I could actually see there are lot of modified files in there. Now this is for sure that I didnt touch any of those files myself. Just wanted to understand what could have gone wrong here. Because its not able to update , I am not able to test my Naming Series issue here.

If you have not changed anything, you can stash the changes. To stash, got erpnext and frappe directory and run git stash command. Then try to update again.