UnicodeEncode Error while running bech update

While running bench update I got the following error:

Patching sites...
Migrating office.kuruntham.in
Updating DocTypes for frappe        : [========================================]
Updating DocTypes for erpnext       : [========================================]
Syncing help database...
Compiling ../apps/foundation/foundation/www/docs/user/manual/lt/įvadas/__init__.py ...
Sorry: UnicodeEncodeError: 'ascii' codec can't encode character u'\u012f' in position 54: ordinal not in range(128)
/home/frappe/frappe-bench/apps/frappe/frappe/build.py:106: UserWarning: Source /home/frappe/frappe-bench/apps/frappe_io/frappe_io/docs does not exists.
  warnings.warn('Source {source} does not exists.'.format(source = source))
/home/frappe/frappe-bench/apps/frappe/frappe/build.py:106: UserWarning: Source /home/frappe/frappe-bench/apps/foundation/foundation/docs does not exists.
  warnings.warn('Source {source} does not exists.'.format(source = source))
SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at make_build_map (/home/frappe/frappe-bench/apps/frappe/frappe/build.js:193:22)
    at Object.<anonymous> (/home/frappe/frappe-bench/apps/frappe/frappe/build.js:22:17)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:191:16)
SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at make_build_map (/home/frappe/frappe-bench/apps/frappe/frappe/build.js:193:22)
    at Object.<anonymous> (/home/frappe/frappe-bench/apps/frappe/frappe/build.js:22:17)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:191:16)
Wrote css/frappe-web.css - 65.11 KB
Wrote js/frappe-web.min.js - 132.77 KB
Wrote js/control.min.js - 77.04 KB
Wrote js/dialog.min.js - 116.9 KB
Wrote css/desk.min.css - 309.04 KB
Wrote css/frappe-rtl.css - 32.49 KB
Wrote js/libs.min.js - 1.13 MB
Wrote js/desk.min.js - 462.73 KB
Wrote css/module.min.css - 2.08 KB
Wrote css/form.min.css - 4.47 KB
Wrote js/form.min.js - 196.65 KB
Wrote css/list.min.css - 13.35 KB
Wrote js/list.min.js - 154.7 KB
Wrote css/report.min.css - 7.89 KB
Wrote js/report.min.js - 260.58 KB
Wrote js/web_form.min.js - 247.55 KB
Wrote css/web_form.css - 24.42 KB
Wrote js/print_format_v3.min.js - 23.39 KB
Wrote css/erpnext.css - 8 KB
Wrote js/erpnext-web.min.js - 3.8 KB
Wrote js/erpnext.min.js - 166.06 KB
Wrote js/item-dashboard.min.js - 8.13 KB
INFO:bench.utils:sudo supervisorctl restart frappe-bench-workers: frappe-bench-web:
frappe-bench-workers:frappe-bench-frappe-schedule: stopped
frappe-bench-workers:frappe-bench-frappe-default-worker-0: stopped
frappe-bench-workers:frappe-bench-frappe-long-worker-0: stopped
frappe-bench-workers:frappe-bench-frappe-short-worker-0: stopped
frappe-bench-web:frappe-bench-node-socketio: stopped
frappe-bench-web:frappe-bench-frappe-web: stopped
frappe-bench-workers:frappe-bench-frappe-schedule: started
frappe-bench-workers:frappe-bench-frappe-default-worker-0: started
frappe-bench-workers:frappe-bench-frappe-long-worker-0: started
frappe-bench-workers:frappe-bench-frappe-short-worker-0: started
frappe-bench-web:frappe-bench-frappe-web: started
frappe-bench-web:frappe-bench-node-socketio: started
________________________________________________________________________________
Bench: Deployment tool for Frappe and ERPNext (https://erpnext.org).
Open source depends on your contributions, so please contribute bug reports, patches, fixes or cash and be a part of the community
()

ERPNext shows the correct version on the About. The version it is showing

ERPNext: v10.1.53 (master)
Frappe Framework: v10.1.48 (master)

But I am not able to see any updated modules of v10.1.53.

How could I resolve this?

cd ~/frappe-bench # or your bench path
cd ./apps/frappe && git fetch upstream && git checkout master && cd -
cd ./apps/erpnext && git fetch upstream && git checkout master && cd -
bench update --requirements
bench update --patch

if above cant fix it, then do…

cd ./apps/frappe && git clean -df && git fetch upstream && git checkout master && cd -

Its always do to do backup!

1 Like

Thanks @yashodhan. Running the first set of command fixes the problem. Is it possible for you to explain what may the root cause of the problem?

Glad to know it worked!
There were two issues as per logs you shared, one with missed patch process and required python dependencies in earlier updates.