V8 Update error

I hate posting an update error thread, but I tried everything I can think of here. I actually cloned my active server and attempted the update last week, a few problems but I resolved them. This week I planned to update the actual server and I keep getting this error:

Reloading bench...
Backing up sites...
Patching sites...
Migrating site1.local
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_mo
dule_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_cod
e
    exec code in run_globals
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils
/bench_helper.py", line 79, in <module>
    main()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils
/bench_helper.py", line 16, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/
site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/
site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/
site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx)
)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/
site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx)
)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/
site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/
site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/home/frappe/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/frappe/frappe-bench/apps/frappe/frappe/comma
nds/__init__.py", line 24, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/comma
nds/site.py", line 210, in migrate
    migrate(context.verbose, rebuild_website=rebuild_websi
te)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/migra
te.py", line 31, in migrate
    frappe.modules.patch_handler.run_all()
 File "/home/frappe/frappe-bench/apps/frappe/frappe/modul
es/patch_handler.py", line 29, in run_all
    if not run_single(patchmodule = patch):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modul
es/patch_handler.py", line 63, in run_single
    return execute_patch(patchmodule, method, methodargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modul
es/patch_handler.py", line 69, in execute_patch
    block_user(True)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modul
es/patch_handler.py", line 118, in block_user
    frappe.db.set_global('__session_status', block and 'st
op' or None)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/datab
ase.py", line 688, in set_global
    self.set_default(key, val, user)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/datab
ase.py", line 696, in set_default
    frappe.defaults.set_default(key, val, parent, parentty
pe)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/defau
lts.py", line 112, in set_default
    add_default(key, value, parent)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/defau
lts.py", line 123, in add_default
    d.insert(ignore_permissions=True)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model
/document.py", line 220, in insert
    self.run_post_save_methods()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model
/document.py", line 800, in run_post_save_methods
    self.run_method('on_change')
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model
/document.py", line 667, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model
/document.py", line 892, in composer
    return composed(self, method, *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model
/document.py", line 877, in runner
    add_to_return_value(self, f(self, method, *args, **kwa
rgs))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/core/
doctype/feedback_trigger/feedback_trigger.py", line 41, in
 trigger_feedback_request
    feedback_triggers = frappe.cache().get_value('feedback
_triggers', _get)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils
/redis_wrapper.py", line 70, in get_value
    val = generator()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/core/
doctype/feedback_trigger/feedback_trigger.py", line 36, in
 _get
    for d in frappe.get_all('Feedback Trigger', dict(enabl
ed=1), ['name', 'document_type']):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__ini
t__.py", line 1139, in get_all
    return get_list(doctype, *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__ini
t__.py", line 1112, in get_list
    return frappe.model.db_query.DatabaseQuery(doctype).ex
ecute(None, *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model
/db_query.py", line 83, in execute
    result = self.build_and_run()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model
/db_query.py", line 95, in build_and_run
    args = self.prepare_args()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model
/db_query.py", line 112, in prepare_args
    self.set_optional_columns()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model
/db_query.py", line 212, in set_optional_columns
    columns = frappe.db.get_table_columns(self.doctype)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/datab
ase.py", line 808, in get_table_columns
    return self.get_db_table_columns('tab' + doctype)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/datab
ase.py", line 804, in get_db_table_columns
    return [r[0] for r in self.sql("DESC `%s`" % table)]
  File "/home/frappe/frappe-bench/apps/frappe/frappe/datab
ase.py", line 149, in sql
    self._cursor.execute(query)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/
site-packages/MySQLdb/cursors.py", line 205, in execute
    self.errorhandler(self, exc, value)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/
site-packages/MySQLdb/connections.py", line 36, in default
errorhandler
    raise errorclass, errorvalue
_mysql_exceptions.ProgrammingError: (1146, "Table '1bd3e02
94d.tabFeedback Trigger' doesn't exist")

Any help would be REALLY appreciated. :slight_smile:

Well you’re not imaging things - no sign of it my 7.2.2 instance but it is my 8.0.8 one!

frappe@erpnext:~/frappe-bench$ find . -name ‘feedback*.py’
./apps/frappe/frappe/www/feedback.py
./apps/frappe/frappe/core/report/feedback_ratings/feedback_ratings.py
./apps/frappe/frappe/core/doctype/feedback_request/feedback_request.py
./apps/frappe/frappe/core/doctype/feedback_trigger/feedback_trigger.py

This may have clues but I am a noob navigating github…

There’s this:

File “/home/frappe/frappe-bench/apps/frappe/frappe/comma
nds/site.py”, line 210, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)

You have tried these
‘bench clear-website-cache’
‘bench clear-cache’

Possibly a patch is not working as expected - identify the patch in question

113 def block_user(block):
114 “”“stop/start execution till patch is run”""
115 frappe.local.flags.in_patch = block
116 frappe.db.begin()
117 msg = “Patches are being executed in the system. Please try again in a few moments.”
118 frappe.db.set_global(’__session_status’, block and ‘stop’ or None)
119 frappe.db.set_global(’__session_status_message’, block and msg or None)
120 frappe.db.commit()

I am also getting same error while upgrade

I got quick fix for this error:

Open doctype: frappe/core/doctype/feedback_trigger/feedback_trigger.py

and comment following line.

Runbench migrate

then again uncomment
Issue Created:

@makarand_b sorry to tag you, but can you help into this.

1 Like

@kolate_sambhaji, @Dbone

fixed the issue on develop, please pull the latest changes and migrate

1 Like