Error Executing frappe.patches.v11_0.rename_google_maps_doctype in testsite (9fc9e8b177b25d7a)

Hi All,

I ran bench update command and this error appeared.

success Already up-to-date.
Done in 0.38s.
Backing up sites…
Patching sites…
Migrating testsite
Executing frappe.patches.v11_0.rename_google_maps_doctype in testsite (9fc9e8b177b25d7a)
Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 174, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/uma/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 97, in
main()
File “/home/uma/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/uma/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/home/uma/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/home/uma/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/uma/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/uma/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/uma/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/uma/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/uma/frappe-bench/apps/frappe/frappe/commands/init.py”, line 25, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/uma/frappe-bench/apps/frappe/frappe/commands/site.py”, line 228, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/home/uma/frappe-bench/apps/frappe/frappe/migrate.py”, line 38, in migrate
frappe.modules.patch_handler.run_all()
File “/home/uma/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 29, in run_all
if not run_single(patchmodule = patch):
File “/home/uma/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 63, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/home/uma/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 83, in execute_patch
frappe.get_attr(patchmodule.split()[0] + “.execute”)()
File “/home/uma/frappe-bench/apps/frappe/frappe/patches/v11_0/rename_google_maps_doctype.py”, line 7, in execute
rename_doc(‘DocType’, ‘Google Maps’, ‘Google Maps Settings’)
File “/home/uma/frappe-bench/apps/frappe/frappe/model/rename_doc.py”, line 52, in rename_doc
update_user_settings(old, new, link_fields)
File “/home/uma/frappe-bench/apps/frappe/frappe/model/rename_doc.py”, line 96, in update_user_settings
sync_user_settings()
File “/home/uma/frappe-bench/apps/frappe/frappe/model/utils/user_settings.py”, line 50, in sync_user_settings
for key, data in iteritems(frappe.cache().hgetall(‘_user_settings’)):
File “/home/uma/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py”, line 160, in hgetall
iteritems(super(RedisWrapper, self).hgetall(self.make_key(name)))}
File “/home/uma/frappe-bench/env/local/lib/python2.7/site-packages/redis/client.py”, line 1967, in hgetall
return self.execute_command(‘HGETALL’, name)
File “/home/uma/frappe-bench/env/local/lib/python2.7/site-packages/redis/client.py”, line 673, in execute_command
connection.send_command(*args)
File “/home/uma/frappe-bench/env/local/lib/python2.7/site-packages/redis/connection.py”, line 610, in send_command
self.send_packed_command(self.pack_command(*args))
File “/home/uma/frappe-bench/env/local/lib/python2.7/site-packages/redis/connection.py”, line 585, in send_packed_command
self.connect()
File “/home/uma/frappe-bench/env/local/lib/python2.7/site-packages/redis/connection.py”, line 489, in connect
raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 111 connecting to localhost:13000. Connection refused.

Thanks,
Ragh.

@ragh, is this on a development setup? If so, can you retry this command while the bench is running?

Hi @RohanB
Development only.
I did, bench start and
in another terminal : bench update.
But i’m getting below error:
Executing erpnext.patches.v11_0.update_delivery_trip_status in testsite (9fc9e8b177b25d7a)
Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 174, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/uma/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 97, in
main()
File “/home/uma/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/uma/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/home/uma/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/home/uma/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/uma/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/uma/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/uma/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/uma/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/uma/frappe-bench/apps/frappe/frappe/commands/init.py”, line 25, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/uma/frappe-bench/apps/frappe/frappe/commands/site.py”, line 228, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/home/uma/frappe-bench/apps/frappe/frappe/migrate.py”, line 38, in migrate
frappe.modules.patch_handler.run_all()
File “/home/uma/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 29, in run_all
if not run_single(patchmodule = patch):
File “/home/uma/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 63, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/home/uma/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 83, in execute_patch
frappe.get_attr(patchmodule.split()[0] + “.execute”)()
File “/home/uma/frappe-bench/apps/erpnext/erpnext/patches/v11_0/update_delivery_trip_status.py”, line 12, in execute
trip_doc = frappe.get_doc(“Delivery Trip”, trip.name)
File “/home/uma/frappe-bench/apps/frappe/frappe/init.py”, line 724, in get_doc
doc = frappe.model.document.get_doc(*args, **kwargs)
File “/home/uma/frappe-bench/apps/frappe/frappe/model/document.py”, line 68, in get_doc
return controller(*args, **kwargs)
File “/home/uma/frappe-bench/apps/erpnext/erpnext/stock/doctype/delivery_trip/delivery_trip.py”, line 21, in init
self.default_distance_uom = frappe.db.get_single_value(“Global Defaults”, “default_distance_unit”) or “Meter”
File “/home/uma/frappe-bench/apps/frappe/frappe/database/database.py”, line 543, in get_single_value
if df.fieldtype in frappe.model.numeric_fieldtypes:
AttributeError: ‘NoneType’ object has no attribute ‘fieldtype’

Thanks,
Ragh.

Hm, weird. Seems like it can’t find the default_distance_unit field.

Try bench migrate before the update, and see if that works?

Not working!

bench reload-doctype "Global Defaults"?

Now it’s showing below error:

Migrating testsite
Updating DocTypes for frappe : [========================================]
Updating DocTypes for erpnext : [===================== ]bad json: /home/uma/frappe-bench/apps/erpnext/erpnext/manufacturing/report/bom_stock_calculated/bom_stock_calculated.json
Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 174, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/uma/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 97, in
main()
File “/home/uma/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/uma/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/home/uma/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/home/uma/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/uma/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/uma/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/uma/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/uma/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/uma/frappe-bench/apps/frappe/frappe/commands/init.py”, line 25, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/uma/frappe-bench/apps/frappe/frappe/commands/site.py”, line 228, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/home/uma/frappe-bench/apps/frappe/frappe/migrate.py”, line 40, in migrate
frappe.model.sync.sync_all(verbose=verbose)
File “/home/uma/frappe-bench/apps/frappe/frappe/model/sync.py”, line 19, in sync_all
sync_for(app, force, verbose=verbose, reset_permissions=reset_permissions)
File “/home/uma/frappe-bench/apps/frappe/frappe/model/sync.py”, line 56, in sync_for
reset_permissions=reset_permissions, for_sync=True)
File “/home/uma/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 45, in import_file_by_path
docs = read_doc_from_file(path)
File “/home/uma/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 85, in read_doc_from_file
doc = json.loads(f.read())
File “/usr/lib/python2.7/json/init.py”, line 339, in loads
return _default_decoder.decode(s)
File “/usr/lib/python2.7/json/decoder.py”, line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python2.7/json/decoder.py”, line 380, in raw_decode
obj, end = self.scan_once(s, idx)
ValueError: Expecting property name: line 15 column 1 (char 352)

@RohanB Thanks. I resolved that issue and finally its working fine!!

1 Like