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

Server error while Creation of Material Issue from Material Request upon selection of a warehouse #625

Closed
pooja-pp8848 opened this issue Nov 13, 2024 · 2 comments · Fixed by 8848digital/frappe-v15#42
Assignees
Labels
bug Something isn't working

Comments

@pooja-pp8848
Copy link

Information about bug

Encountering with the following error while selecting a Warehouse for material issue

image

Module

buying

Version

ERPNext: v15.34.0 (pre-prod)

Frappe Framework: v15.41.0 (pre-prod)

Installation method

None

Relevant log output / Stack trace / Full Error Message.

### App Versions

{
	"assets": "0.0.1",
	"erpnext": "15.34.0",
	"frappe": "15.41.0",
	"payments": "0.0.1",
	"projects": "0.0.1",
	"sales_commission": "0.0.1"
}

Route

Form/Stock Entry/new-stock-entry-pydtemquds

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 49, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1775, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
    return func(*args, **kwargs)
  File "apps/frappe/frappe/client.py", line 465, in validate_link
    values.name = frappe.db.get_value(doctype, filters, cache=True)
  File "apps/frappe/frappe/database/database.py", line 515, in get_value
    result = self.get_values(
  File "apps/frappe/frappe/database/database.py", line 593, in get_values
    out = self._get_value_for_many_names(
  File "apps/frappe/frappe/database/database.py", line 912, in _get_value_for_many_names
    return frappe.qb.get_query(
  File "apps/frappe/frappe/query_builder/utils.py", line 87, in execute_query
    result = frappe.db.sql(query, params, *args, **kwargs)  # nosemgrep
  File "apps/frappe/frappe/database/postgres/database.py", line 310, in sql
    return super().sql(modify_query(query), modify_values(values), *args, **kwargs)
  File "apps/frappe/frappe/database/database.py", line 227, in sql
    self._cursor.execute(query, values)
psycopg2.errors.InvalidTextRepresentation: invalid input syntax for type smallint: "No"
LINE 1: ...arehouse" WHERE "company"='PP Ltd' AND "is_group"='No' AND "...
                                                             ^


Request Data

{
	"type": "POST",
	"args": {
		"doctype": "Warehouse",
		"docname": "Finished Goods - PP Ltd",
		"fields": "[]",
		"args": "{\"filters\":[[\"Warehouse\",\"company\",\"=\",\"PP Ltd\"],[\"Warehouse\",\"is_group\",\"=\",\"No\"],[\"Warehouse\",\"name\",\"!=\",\"Sample Warehouse - FC\"]]}"
	},
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/frappe.client.validate_link",
	"request_id": null
}

Response Data

{
	"exception": "",
	"exc_type": "InvalidTextRepresentation",
	"_debug_messages": "[\"Error in query:\\ninvalid input syntax for type smallint: \\\"No\\\"\\nLINE 1: ...arehouse\\\" WHERE \\\"company\\\"='PP Ltd' AND \\\"is_group\\\"='No' AND \\\"...\\n                                                             ^\\n\"]"
}
@pooja-pp8848 pooja-pp8848 added the bug Something isn't working label Nov 13, 2024
@anandk-spyke-o1 anandk-spyke-o1 self-assigned this Nov 13, 2024
@anandk-spyke-o1
Copy link

Common with #582

@tinadn
Copy link

tinadn commented Nov 14, 2024

Resolved. Hence closing.

@tinadn tinadn closed this as completed Nov 14, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants