Errors After Upate v6.27.12

Hi

I am using the virtual machine with virtual box, all was running fine for months now, after the latest update i get the following error. Please not this is urgent and no one can use the buying module or purchase order system…

Traceback (most recent call last):

  File
"/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 57, in
application

    response = frappe.handler.handle()

  File
"/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 19,
in handle

    execute_cmd(cmd)

  File
"/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 36,
in execute_cmd

    ret = frappe.call(method,
**frappe.form_dict)

  File
"/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 855,
in call

    return fn(*args, **newargs)

  File
"/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/load.py",
line 65, in getdoctype

    docs = get_meta_bundle(doctype)

  File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/load.py",
line 75, in get_meta_bundle

    bundle =
[frappe.desk.form.meta.get_meta(doctype)]

  File
"/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/meta.py",
line 20, in get_meta

    meta = frappe.cache().hget("form_meta",
doctype, lambda: FormMeta(doctype))

  File
"/home/frappe/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py",
line 145, in hget

    value = generator()

  File
"/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/meta.py",
line 20, in 

    meta =
frappe.cache().hget("form_meta", doctype, lambda: FormMeta(doctype))

  File
"/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/meta.py",
line 32, in __init__

    self.load_assets()

  File
"/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/meta.py",
line 39, in load_assets

    self.add_code()

  File
"/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/meta.py",
line 62, in add_code

    self._add_code(_get_path(self.name +
'.js'), '__js')

  File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/meta.py",
line 77, in _add_code

    js = get_js(path)

  File
"/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/meta.py",
line 185, in get_js

    return render_include(js)

  File
"/home/frappe/frappe-bench/apps/frappe/frappe/model/utils/__init__.py",
line 49, in render_include

    with open(frappe.get_app_path(app,
app_path), 'r') as f:

  File
"/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 645,
in get_app_path

    return get_pymodule_path(app_name,
*joins)

  File
"/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 660,
in get_pymodule_path

    return
os.path.join(os.path.dirname(get_module(scrub(modulename)).__file__), *joins)

  File
"/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 622,
in get_module

    return
importlib.import_module(modulename)

  File
"/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module

    __import__(name)

ImportError: No module named buying







Same here: Cannot create purchase or Sales invoice

I’ve already issued a bug report on git: https://github.com/frappe/erpnext/issues/5270

@ermalc when did you last update before this update?

@anand

i updated just now, 10 minutes ago

@anand

also on the 21st of April

Hi @anand

Are you or anyone here in a position to help with this, it is obviously a big as it has been reported by other users as i see, so would be good to sort this as we cannot use it as it is…

Just to confirm, the last update i did was on the 21st of April and that was Release v6.27.10 , which at the point did break my email alert functionality, no emails could be sent and also the supplier screen would have an error saying LOADING, i already raised this as an issue on here, different thread.

Today i updated again to the latest version and as mentioned above the buying module does not work…, gives the above errors.

I have restarted, reloaded , but still the same issues…

Please help

@ermalc I think your supervisor processes are not getting restarted. I am pushing a fix in a few mins that should take care of everyone’s problems about develop and master branch compatibility issues due to bench.

@anand

thanks, please let me know when you have done this so i can run another update on my end…

thanks

@ermalc Just realized that the issue you are facing is because of cache. It looks like when you did bench update, it got an error, which you might not have noticed and so the cache clearing that happens at the end of bench update didn’t happen. From the UI, you can click on the top right menu and click on reload. Check if this works.

hi @anand

No, it has nothing to do with the cache, as i mentioned above i have done this a 100 times, it says cache cleared every time i do that, i have also restarted the VM and everything associated with it, it is not an issue associated with caching as far as i can see

can you check the following:

cd /home/frappe/frappe-bench/apps/erpnext
git log

Can you paste the output of the git log command?

and also do git status just to make sure there are no unexpected changes

@anand

git status

your branch is up-to-date with ‘upstream/master’.

Was it on develop branch before?

@anand

not sure, i am using the virtual image for this with virtual box, so whatever was pre-loaded on that image, i haven’t done any custom changes apart from the updates that you release…

@ermalc I think I got the problem. Your ERPNext app is in master branch while your frappe app is in develop branch. The develop branch is the ongoing branch for version 7. So the framework is new and your erpnext app is old and hence the mess. The VM was misconfigured from our end from the start. But you didn’t face any problem till now because the gap between master and develop was negligible before this month.

The way ahead for you is to move to develop branch. This should fix your problems:

cd /home/frappe/bench-repo
git checkout develop
git fetch origin develop
git reset --hard origin/develop
cd /home/frappe/frappe-bench
bench switch-to-develop
bench update
bench setup redis
bench setup supervisor
sudo supervisorctl reread
sudo supervisorctl update

I followed the instructions and I’m stuck in bench update, this is the error now:

What is the migration error above that trace? When upgrading and an error occurs in migrate you get back two traces.

@anand

i get the same errors as @applepipe has described or shown on here, when trying to follow your steps…

also, if i go to the end and do all your steps, and try to access the system via the web interface, i get the below errors

Traceback (most recent call last): File "/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py", line 25, in render data = render_page_by_language(path) File "/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py", line 91, in render_page_by_language return render_page(path) File "/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py", line 107, in render_page return build(path) File "/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py", line 114, in build return build_page(path) File "/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py", line 127, in build_page context = get_context(path) File "/home/frappe/frappe-bench/apps/frappe/frappe/website/context.py", line 16, in get_context context = build_context(context) File "/home/frappe/frappe-bench/apps/frappe/frappe/website/context.py", line 64, in build_context ret = module.get_context(context) File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/pages/desk.py", line 21, in get_context boot = frappe.sessions.get() File "/home/frappe/frappe-bench/apps/frappe/frappe/sessions.py", line 107, in get bootinfo["notification_info"] = get_notification_info_for_boot() File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/notifications.py", line 133, in get_notification_info_for_boot out = get_notifications() File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/notifications.py", line 26, in get_notifications "open_count_doctype": get_notifications_for_doctypes(config, notification_count), File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/notifications.py", line 92, in get_notifications_for_doctypes filters=condition, limit_page_length = 21, as_list=True)) File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1016, in get_list return frappe.model.db_query.DatabaseQuery(doctype).execute(None, *args, **kwargs) File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 72, in execute result = self.build_and_run() File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 92, in build_and_run return frappe.db.sql(query, as_dict=not self.as_list, debug=self.debug) File "/home/frappe/frappe-bench/apps/frappe/frappe/database.py", line 147, 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 defaulterrorhandler raise errorclass, errorvalue OperationalError: (1054, "Unknown column 'tabSupplier.status' in 'where clause'")

That screenshot didnt have the full traceback. Can you share the full output of the bench update step.