Issue with new doctypes

Hi Everyone,
I am stuck up in a tricky situation, whenever I create a new doctype and then I create any new record using that doctype everything is fine upto this stage, but I am not able to open any of these doctype after creating.
Below the error I got when I try to open that:

Traceback (most recent call last):
  File "/home/vishnu/frappe-bench/apps/frappe/frappe/desk/form/load.py", line 32, in getdoc
    doc = frappe.get_doc(doctype, name)
  File "/home/vishnu/frappe-bench/apps/frappe/frappe/__init__.py", line 596, in get_doc
    return frappe.model.document.get_doc(arg1, arg2)
  File "/home/vishnu/frappe-bench/apps/frappe/frappe/model/document.py", line 50, in get_doc
    return controller(arg1, arg2)
  File "/home/vishnu/frappe-bench/apps/frappe/frappe/model/document.py", line 83, in __init__
    self.load_from_db()
  File "/home/vishnu/frappe-bench/apps/frappe/frappe/model/document.py", line 116, in load_from_db
    super(Document, self).__init__(d)
  File "/home/vishnu/frappe-bench/apps/frappe/frappe/model/base_document.py", line 52, in __init__
    self.update(d)
  File "/home/vishnu/frappe-bench/apps/frappe/frappe/model/base_document.py", line 75, in update
    self.set(key, value)
TypeError: 'NoneType' object is not callable

Traceback (most recent call last):
  File "/home/vishnu/frappe-bench/apps/frappe/frappe/app.py", line 55, in application
    response = frappe.handler.handle()
  File "/home/vishnu/frappe-bench/apps/frappe/frappe/handler.py", line 19, in handle
    execute_cmd(cmd)
  File "/home/vishnu/frappe-bench/apps/frappe/frappe/handler.py", line 40, in execute_cmd
    ret = frappe.call(method, **frappe.form_dict)
  File "/home/vishnu/frappe-bench/apps/frappe/frappe/__init__.py", line 897, in call
    return fn(*args, **newargs)
  File "/home/vishnu/frappe-bench/apps/frappe/frappe/desk/form/load.py", line 32, in getdoc
    doc = frappe.get_doc(doctype, name)
  File "/home/vishnu/frappe-bench/apps/frappe/frappe/__init__.py", line 596, in get_doc
    return frappe.model.document.get_doc(arg1, arg2)
  File "/home/vishnu/frappe-bench/apps/frappe/frappe/model/document.py", line 50, in get_doc
    return controller(arg1, arg2)
  File "/home/vishnu/frappe-bench/apps/frappe/frappe/model/document.py", line 83, in __init__
    self.load_from_db()
  File "/home/vishnu/frappe-bench/apps/frappe/frappe/model/document.py", line 116, in load_from_db
    super(Document, self).__init__(d)
  File "/home/vishnu/frappe-bench/apps/frappe/frappe/model/base_document.py", line 52, in __init__
    self.update(d)
  File "/home/vishnu/frappe-bench/apps/frappe/frappe/model/base_document.py", line 75, in update
    self.set(key, value)
TypeError: 'NoneType' object is not callable

Any idea about this?

Regards
Ruchin Sharma

Hello Ruchin,

For these doctypes, is field “Custom?” checked? Have you enabled developer mode for this ERPNext instance?

Hi @um
Yes, custom is checked but I am not using the developer mode.
Because I want to test it in the product instance.

Regards
Ruchin Sharma

Hi @ruchin78

I have created new custom doctype and it’s working properly, I have checked on latest version.
can you share the screenshots of your doctype?

Hello

Are you getting the production code (Master) and develop code branches mixed up with develop mode which is the mode you require to make a custom module? ‘Develop’ is used for these two different cases quite separately. There are actually 4 uses environments. ie you can be in Develop model ‘mode’ ie developing code in the ‘develop’ github code instance and also develop mode in the ‘master’ ie production code branch instance.

see https://discuss.frappe.io/t/breaking-down-environment-and-branch-develop-master/20603/3

for an explanation, as it is confusing

Hi @rohit_w
Below is the screenshot for your reference:

Regards
Ruchin Sharma

@Julian_Robbins
I am using only the production mode which is a clone of my production server. It is actually a Test Instance.

Regards
Ruchin Sharma

@ruchin78 I am getting the same error. I think this error is popuping after I have deleted and recreated the same docType.