bench  migrate
Migrating skyway_live.com
Updating DocTypes for frappe        : [========================================] 100%
Updating DocTypes for erpnext       : [========================================] 100%
Updating DocTypes for hrms          : [========================================] 100%
Updating DocTypes for c4_service    : [========================================] 100%
Executing erpnext.patches.v14_0.update_pos_return_ledger_entries in skyway_live.com (_0b6d4daab78f2e35)
'Syntax error in query:\nSELECT `name`,`return_against` FROM `tabSales Invoice` WHERE `name` IN () AND NOT `return_against` IS NULL ORDER BY `name` '
Queued rebuilding of search index for skyway_live.com

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/asofi/Benches/bench_asofi_v15/apps/frappe/frappe/utils/bench_helper.py", line 114, in <module>
    main()
  File "/home/asofi/Benches/bench_asofi_v15/apps/frappe/frappe/utils/bench_helper.py", line 20, in main
    click.Group(commands=commands)(prog_name="bench")
  File "/home/asofi/Benches/bench_asofi_v15/env/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/home/asofi/Benches/bench_asofi_v15/env/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/home/asofi/Benches/bench_asofi_v15/env/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/asofi/Benches/bench_asofi_v15/env/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/asofi/Benches/bench_asofi_v15/env/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/asofi/Benches/bench_asofi_v15/env/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/home/asofi/Benches/bench_asofi_v15/env/lib/python3.10/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/asofi/Benches/bench_asofi_v15/apps/frappe/frappe/commands/__init__.py", line 29, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/asofi/Benches/bench_asofi_v15/apps/frappe/frappe/commands/site.py", line 686, in migrate
    SiteMigration(
  File "/home/asofi/Benches/bench_asofi_v15/apps/frappe/frappe/migrate.py", line 186, in run
    self.run_schema_updates()
  File "/home/asofi/Benches/bench_asofi_v15/apps/frappe/frappe/migrate.py", line 52, in wrapper
    raise e
  File "/home/asofi/Benches/bench_asofi_v15/apps/frappe/frappe/migrate.py", line 44, in wrapper
    ret = method(*args, **kwargs)
  File "/home/asofi/Benches/bench_asofi_v15/apps/frappe/frappe/migrate.py", line 121, in run_schema_updates
    frappe.modules.patch_handler.run_all(
  File "/home/asofi/Benches/bench_asofi_v15/apps/frappe/frappe/modules/patch_handler.py", line 76, in run_all
    run_patch(patch)
  File "/home/asofi/Benches/bench_asofi_v15/apps/frappe/frappe/modules/patch_handler.py", line 62, in run_patch
    if not run_single(patchmodule=patch):
  File "/home/asofi/Benches/bench_asofi_v15/apps/frappe/frappe/modules/patch_handler.py", line 152, in run_single
    return execute_patch(patchmodule, method, methodargs)
  File "/home/asofi/Benches/bench_asofi_v15/apps/frappe/frappe/modules/patch_handler.py", line 188, in execute_patch
    _patch()
  File "/home/asofi/Benches/bench_asofi_v15/apps/erpnext/erpnext/patches/v14_0/update_pos_return_ledger_entries.py", line 41, in execute
    .run()
  File "/home/asofi/Benches/bench_asofi_v15/apps/frappe/frappe/query_builder/utils.py", line 87, in execute_query
    result = frappe.db.sql(query, params, *args, **kwargs)  # nosemgrep
  File "/home/asofi/Benches/bench_asofi_v15/apps/frappe/frappe/database/database.py", line 229, in sql
    self._cursor.execute(query, values)
  File "/home/asofi/Benches/bench_asofi_v15/env/lib/python3.10/site-packages/pymysql/cursors.py", line 153, in execute
    result = self._query(query)
  File "/home/asofi/Benches/bench_asofi_v15/env/lib/python3.10/site-packages/pymysql/cursors.py", line 322, in _query
    conn.query(q)
  File "/home/asofi/Benches/bench_asofi_v15/env/lib/python3.10/site-packages/pymysql/connections.py", line 563, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File "/home/asofi/Benches/bench_asofi_v15/env/lib/python3.10/site-packages/pymysql/connections.py", line 825, in _read_query_result
    result.read()
  File "/home/asofi/Benches/bench_asofi_v15/env/lib/python3.10/site-packages/pymysql/connections.py", line 1199, in read
    first_packet = self.connection._read_packet()
  File "/home/asofi/Benches/bench_asofi_v15/env/lib/python3.10/site-packages/pymysql/connections.py", line 775, in _read_packet
    packet.raise_for_error()
  File "/home/asofi/Benches/bench_asofi_v15/env/lib/python3.10/site-packages/pymysql/protocol.py", line 219, in raise_for_error
    err.raise_mysql_exception(self._data)
  File "/home/asofi/Benches/bench_asofi_v15/env/lib/python3.10/site-packages/pymysql/err.py", line 150, in raise_mysql_exception
    raise errorclass(errno, errval)
pymysql.err.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') AND NOT `return_against` IS NULL ORDER BY `name`' at line 1")