Cannot view contact in CRM app - Not permitted Internal Server Error

I can view the contact in Desk but not in CRM app.

pop expected at least 1 argument, got 0

Traceback with variables (most recent call last):
File “apps/frappe/frappe/app.py”, line 115, in application
response = frappe.api.handle(request)
request = <Request ‘https://crm.paneluxe.in/api/method/crm.api.contact.get_contact’ [POST]>
response = None
rollback = True
e = TypeError(‘pop expected at least 1 argument, got 0’)
File “apps/frappe/frappe/api/init.py”, line 49, in handle
data = endpoint(**arguments)
request = <Request ‘https://crm.paneluxe.in/api/method/crm.api.contact.get_contact’ [POST]>
endpoint = <function handle_rpc_call at 0x7f0c7092d7e0>
arguments = {‘method’: ‘crm.api.contact.get_contact’}
File “apps/frappe/frappe/api/v1.py”, line 36, in handle_rpc_call
return frappe.handler.handle()
method = ‘crm.api.contact.get_contact’
frappe = <module ‘frappe’ from ‘apps/frappe/frappe/init.py’>
File “apps/frappe/frappe/handler.py”, line 51, in handle
data = execute_cmd(cmd)
cmd = ‘crm.api.contact.get_contact’
data = None
File “apps/frappe/frappe/handler.py”, line 84, in execute_cmd
return frappe.call(method, **frappe.form_dict)
cmd = ‘crm.api.contact.get_contact’
from_async = False
server_script = None
method = <function get_contact at 0x7f0c6ddf5480>
File “apps/frappe/frappe/init.py”, line 1736, in call
return fn(*args, **newargs)
fn = <function get_contact at 0x7f0c6ddf5480>
args = ()
kwargs = {‘name’: ‘Kiriti Testing Live M’, ‘cmd’: ‘crm.api.contact.get_contact’}
newargs = {‘name’: ‘Kiriti Testing Live M’}
File “apps/frappe/frappe/utils/typing_validations.py”, line 31, in wrapper
return func(*args, **kwargs)
args = ()
kwargs = {‘name’: ‘Kiriti Testing Live M’}
apply_condition = <function whitelist..innerfn.. at 0x7f0c6ddf53f0>
func = <function get_contact at 0x7f0c6ddf5360>
File “apps/crm/crm/api/contact.py”, line 33, in get_contact
contact = contact.pop()
name = ‘Kiriti Testing Live M’
contact = {‘name’: ‘Kiriti Testing Live M’, ‘owner’: ‘mkiriti@groupske.com’, ‘creation’: datetime.datetime(2025, 4, 13, 21, 17, 8, 196994), ‘modified’: datetime.datetime(2025, 4, 14, 9, 24, 18, 460551), ‘modified_by’: ‘Administrator’, ‘docstatus’: 0, ‘idx’: 1, ‘first_name’: ‘Kiriti Testing Live’, ‘middle_name’: None, ‘last_name’: ‘M’, ‘full_name’: ‘Kiriti Testing Live M’, ‘email_id’: ‘mkiriti@live.com’, ‘user’: None, ‘address’: None, ‘sync_with_google_contacts’: 0, ‘status’: ‘Open’, ‘salutation’: ‘’, ‘designation’: None, ‘gender’: ‘’, ‘phone’: ‘’, ‘mobile_no’: ‘+19794024197’, ‘company_name’: ‘’, ‘image’: ‘’, ‘google_contacts’: None, ‘google_contacts_id’: None, ‘pulled_from_google_contacts’: 0, ‘is_primary_contact’: 0, ‘department’: None, ‘unsubscribed’: 0, ‘doctype’: ‘Contact’, ‘email_ids’: [{‘name’: ‘76qho43brg’, ‘owner’: ‘mkiriti@groupske.com’, ‘creation’: datetime.datetime(2025, 4, 13, 21, 17, 8, 196994), ‘modified’: datetime.datetime(2025, 4, 14, 9, 24, 18, 460551), ‘modified_by’: 'Administr…
builtins.TypeError: pop expected at least 1 argument, got 0

Facing same issue. Not sure how to resolve this!

Are you two using Docker for this?
If so you need to do a bench get crm --branch main (Assuming you want the current one)
but you must do it on all of the proper containers

  • frappe_docker_backend-1
  • frappe_docker-frontend-1
  • frappe_docker-scheduler-1
  • frappe_docker-websocket-1
  • frappe_docker-queue-long-1
  • frappe_docker-queue-short-1
    those are my container names I don’t know how yours are set up

and then on the “frappe_docker_backend-1” container (I assume you need to do this on bare metal install as well)

  • bench --site frontend install-app crm
  • bench --site frontend migrate
  • bench --site frontend clear-cache
  • bench restart
    Please Note frontend is the name of the default site in Docker but may not mimic yours
    then I would run a restart on all containers
    docker restart $(docker ps -q)

I have a script I made and tested for the other apps but its not tested for crm so if you would like you are welcome to run it from the repo I made, but maybe test it on a test system first.

directory - craftsman/apps
please note the wiki one will break your system so do not use it I need to figure out what to do for that one.

Have the same issue on crm on frappe cloud

well that’s odd, is it just a specific thing you are selecting?

Nope, all contacts have the same issue. In desk I can see the contact without any issues.

This just started happening recently, it was not an issue on Frappe cloud before.

The demo site on frappe works fine, I do not have access to the desk on demo site to find out the version number.

so are you running locally on on cloud?

I have same issue on frappe cloud and also on my self hosted vps.

Strangely the demo site works fine

are you using docker for your local build if yes you need ot make sure you get all the support files on all the right contianers