Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regenerate Search Index not working in custom app created through frappe_docker #2116

Open
adarshkh2397 opened this issue Dec 25, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@adarshkh2397
Copy link

Information about bug

When clicking on Regenerate Search Index (under general settings section of helpdesk) leads to an API error with 500 code.
I have attached a screen recording for reference. The helpdesk app has been installed according to the steps mentioned in
custom app.md in frappe_docker.
Video attachment

Version

App Versions

{
	"erpnext": "15.46.2",
	"frappe": "15.50.1",
	"helpdesk": "1.3.1",
	"hrms": "15.36.1"
}

Installation method

docker

Relevant log output / Stack trace / Full Error Message.

### Route

Form/HD Settings/HD Settings

Traceback

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 114, in application
    response = frappe.api.handle(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/api/__init__.py", line 49, in handle
    data = endpoint(**arguments)
           ^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
    return frappe.handler.handle()
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/handler.py", line 50, in handle
    data = execute_cmd(cmd)
           ^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/handler.py", line 86, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/__init__.py", line 1726, in call
    return fn(*args, **newargs)
           ^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/contextlib.py", line 81, in inner
    return func(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^
  File "apps/helpdesk/helpdesk/search.py", line 386, in build_index
    search.build_index()
  File "apps/helpdesk/helpdesk/search.py", line 248, in build_index
    self.create_index()
  File "apps/helpdesk/helpdesk/search.py", line 119, in create_index
    self.redis.ft(self.index_name).create_index(
  File "env/lib/python3.12/site-packages/redis/commands/search/commands.py", line 141, in create_index
    return self.execute_command(*args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "env/lib/python3.12/site-packages/redis/client.py", line 1269, in execute_command
    return conn.retry.call_with_retry(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "env/lib/python3.12/site-packages/redis/retry.py", line 46, in call_with_retry
    return do()
           ^^^^
  File "env/lib/python3.12/site-packages/redis/client.py", line 1270, in <lambda>
    lambda: self._send_command_parse_response(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "env/lib/python3.12/site-packages/redis/client.py", line 1246, in _send_command_parse_response
    return self.parse_response(conn, command_name, **options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "env/lib/python3.12/site-packages/redis/client.py", line 1286, in parse_response
    response = connection.read_response()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "env/lib/python3.12/site-packages/redis/connection.py", line 897, in read_response
    raise response
redis.exceptions.ResponseError: unknown command `FT.CREATE`, with args beginning with: `_ee0a4a6087c4956b|helpdesk_idx`, `PREFIX`, `1`, `_ee0a4a6087c4956b|search_doc:`, `SCORE`, `1.0`, `STOPWORDS`, `45`, `a`, `is`, 

Request Data

{
	"type": "POST",
	"args": {},
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/helpdesk.search.build_index",
	"request_id": null
}

Response Data

{
	"exception": "redis.exceptions.ResponseError: unknown command `FT.CREATE`, with args beginning with: `_ee0a4a6087c4956b|helpdesk_idx`, `PREFIX`, `1`, `_ee0a4a6087c4956b|search_doc:`, `SCORE`, `1.0`, `STOPWORDS`, `45`, `a`, `is`, ",
	"exc_type": "ResponseError",
	"_exc_source": "helpdesk (app)"
}
@adarshkh2397 adarshkh2397 added the bug Something isn't working label Dec 25, 2024
@kalungia
Copy link

kalungia commented Jan 2, 2025

am also getting the same error, not using docker

### App Versions

{
	"crm": "2.0.0-dev",
	"erpnext": "16.0.0-dev",
	"frappe": "16.0.0-dev",
	"frappe_whatsapp": "1.0.7",
	"helpdesk": "1.2.0",
	"hrms": "16.0.0-dev",
	"imbra": "0.1.1-dev",
	"link_sms": "0.0.1"
}

### Route

Form/HD Settings/HD Settings

### Traceback

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 117, in application
    response = frappe.api.handle(request)
  File "apps/frappe/frappe/api/__init__.py", line 49, in handle
    data = endpoint(**arguments)
  File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 50, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 86, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1718, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/utils/typing_validations.py", line 32, in wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python3.10/contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "apps/helpdesk/helpdesk/search.py", line 386, in build_index
    search.build_index()
  File "apps/helpdesk/helpdesk/search.py", line 248, in build_index
    self.create_index()
  File "apps/helpdesk/helpdesk/search.py", line 119, in create_index
    self.redis.ft(self.index_name).create_index(
  File "env/lib/python3.10/site-packages/redis/commands/search/commands.py", line 221, in create_index
    return self.execute_command(*args)
  File "env/lib/python3.10/site-packages/redis/client.py", line 543, in execute_command
    return conn.retry.call_with_retry(
  File "env/lib/python3.10/site-packages/redis/retry.py", line 46, in call_with_retry
    return do()
  File "env/lib/python3.10/site-packages/redis/client.py", line 544, in <lambda>
    lambda: self._send_command_parse_response(
  File "env/lib/python3.10/site-packages/redis/client.py", line 520, in _send_command_parse_response
    return self.parse_response(conn, command_name, **options)
  File "env/lib/python3.10/site-packages/redis/client.py", line 560, in parse_response
    response = connection.read_response()
  File "env/lib/python3.10/site-packages/redis/connection.py", line 536, in read_response
    raise response
redis.exceptions.ResponseError: unknown command `FT.CREATE`, with args beginning with: `_8913d2df44166659|helpdesk_idx`, `PREFIX`, `1`, `_8913d2df44166659|search_doc:`, `SCORE`, `1.0`, `STOPWORDS`, `45`, `a`, `is`, 


### Request Data

{
	"type": "POST",
	"args": {},
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/helpdesk.search.build_index",
	"request_id": null
}

### Response Data

{
	"exception": "redis.exceptions.ResponseError: unknown command `FT.CREATE`, with args beginning with: `_8913d2df44166659|helpdesk_idx`, `PREFIX`, `1`, `_8913d2df44166659|search_doc:`, `SCORE`, `1.0`, `STOPWORDS`, `45`, `a`, `is`, ",
	"exc_type": "ResponseError",
	"_exc_source": "helpdesk (app)"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants