Updating the Virtual Image to Version 11

After many trials and errors, here’s my newbie experience that worked updating the Virtual Image (Production) to Version 11:

In case you can’t fetch the staging branch, execute this command from the app’s directory:

git config remote.upstream.fetch “+refs/heads/:refs/remotes/upstream/

Then run git fetch upstream to fetch staging branch.

cd frappe/frappe-bench # or your bench path
cd apps/frappe && git fetch upstream && git checkout staging && cd -
cd apps/erpnext && git fetch upstream && git checkout staging && cd -

bench switch-to-branch staging frappe erpnext
bench update --requirements
bench update --patch

2 Likes

Opps, tried to credit the various posts to get here:

@rmehta and @snv

Anyway, after doing all this, I tried running bench update just to see if that works, and I get this

SyntaxError: malformed import statement in .....

After which, the display starts to look like this:

Screenshot%20(5)

The Error log says this:

Title

frappe.website.doctype.web_page.web_page.check_publish_status
Error
{‘event’: u’all’, ‘retry’: 0, ‘e’: InternalError(1054, u"Unknown column ‘start_date’ in ‘field list’“), ‘log’: <function log at 0x7fb40da6fc08>, ‘site’: u’site1.local’, ‘job_name’: u’frappe.website.doctype.web_page.web_page.check_publish_status’, ‘method_name’: u’frappe.website.doctype.web_page.web_page.check_publish_status’, ‘method’: <function check_publish_status at 0x7fb40da84320>, ‘user’: u’Administrator’, ‘kwargs’: {}, ‘is_async’: True}
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py”, line 103, in execute_job
method(**kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/doctype/web_page/web_page.py”, line 147, in check_publish_status
web_pages = frappe.get_all(“Web Page”, fields=[“name”, “published”, “start_date”, “end_date”])
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1262, in get_all
return get_list(doctype, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1235, 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 88, in execute
result = self.build_and_run()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 112, in build_and_run
return frappe.db.sql(query, as_dict=not self.as_list, debug=self.debug, update=self.update)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 210, in sql
self._cursor.execute(query)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py”, line 170, in execute
result = self._query(query)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py”, line 328, in _query
conn.query(q)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 516, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 727, in _read_query_result
result.read()
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 1066, in read
first_packet = self.connection._read_packet()
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 683, in _read_packet
packet.check_error()
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/protocol.py”, line 220, in check_error
err.raise_mysql_exception(self._data)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/err.py”, line 109, in raise_mysql_exception
raise errorclass(errno, errval)
InternalError: (1054, u"Unknown column ‘start_date’ in ‘field list’”)

There was a minor bug in chat.less in the staging branch. As your error above shows, Line 6 is using curly braces instead of brackets, it should be:

@import (reference) "common.less";

If you make this temporary change, you can later revert it with git reset HEAD after it is fixed before running bench update again.

This is now fixed by pull #6637.

1 Like

Eesh. I skipped all this and just did a fresh install starting with a new Ubuntu 16. It was very smooth using this guide:

Hi community,

am still facing this issue this morning even after being fixed and merged…

Building frappe assets…

SyntaxError: malformed import statement in /home/frappe/frappe-bench/apps/frappe/frappe/public/less/chat.less on line 6, column 1:
5 @import “flex.less”;
6 @import {reference} “common.less”;
7

kindly help.