Version AttributeError: 'Subscription' object has no attribute 'naming_series'

Hi,

I’m running into below error when trying to create a subscription.
I’ve tried running a bench migrate on my install but still no joy.
Any ideas on how to get around this?

ERPNext v11.1.77.

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 22, in savedocs
doc.save()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 260, in save
return self._save(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 283, in _save
self.insert()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 217, in insert
self.set_new_name()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 378, in set_new_name
set_new_name(self)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/naming.py”, line 42, in set_new_name
set_name_from_naming_options(autoname, doc)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/naming.py”, line 71, in set_name_from_naming_options
set_name_by_naming_series(doc)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/naming.py”, line 81, in set_name_by_naming_series
if not doc.naming_series:
AttributeError: ‘Subscription’ object has no attribute ‘naming_series’

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 61, 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 56, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1036, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 22, in savedocs
doc.save()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 260, in save
return self._save(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 283, in _save
self.insert()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 217, in insert
self.set_new_name()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 378, in set_new_name
set_new_name(self)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/naming.py”, line 42, in set_new_name
set_name_from_naming_options(autoname, doc)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/naming.py”, line 71, in set_name_from_naming_options
set_name_by_naming_series(doc)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/naming.py”, line 81, in set_name_by_naming_series
if not doc.naming_series:
AttributeError: ‘Subscription’ object has no attribute ‘naming_series’

Welcome to ERPNext,

You had reason to install that version?

These posts may help -

@clarkej

This was after a recent migration from v10 to v11.
Do we have any options beyond importing this on another fresh install?

This was working previously.

Also, running a reload like you suggested on a different thread doesn’t work.

bench --site <sitename> reload-doc accounts doctype subscription 

Excuse me I had meant to point you to this Version 11 to 12 data schema - AttributeError: ‘Subscription’ object has no attribute ‘naming_series’

From the traceback my guess is the autoname or naming_series spec is not set?

Maybe check in the Naming Auto Name here
https://localhost/desk#Form/DocType/Subscription

“Do we have any options beyond importing this on another fresh install?”

I am not sure whether a fresh install will reset this since it’s a data problem…

This will inform you Naming Series

Thanks @clarkej

This helped a lot :slight_smile:

https://docs.erpnext.com/docs/user/manual/en/setting-up/settings/naming-series

To fix this issue,
Open Subscription, then Go to Customize, Under Naming remove “:” column sign
naming_series: change to naming_series