From 81b6ca3a790e30c27d521a8d68d25ba99eb1fefc Mon Sep 17 00:00:00 2001 From: tuannn2 Date: Tue, 20 Jun 2023 14:27:11 +0700 Subject: [PATCH] fix(readme): Add Information of python2 to python3 change when running file migration scripts Signed-off-by: tuannn2 --- scripts/migrations/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/migrations/README.md b/scripts/migrations/README.md index 718e470435..9692a48a1e 100644 --- a/scripts/migrations/README.md +++ b/scripts/migrations/README.md @@ -4,7 +4,7 @@ This folder contains scripts which implement the database migrations. The scripts are written in `python2` and depend on `python2-couchdb`. The couchdb has to run and be accessible on `localhost:5984`. -From release 16.0.0 onwards python2 is not supported.All migration scripts form release 16.0.0 onwards are in python3. +From release 16.0.0 onwards python2 is not supported.All migration scripts form release 16.0.0 onwards are in python3. To adapt the migrate scripts to be Python 3 compatible, you need to change the print statement to a print() function. Because in Python 2, print is a statement and can be used without parentheses. However, in Python 3, print is a function and therefore always requires parentheses. Try modifying print "CR Id: " + cr.get("_id") like this: print("CR Id: " + str(cr.get("_id"))). To migrate it is recommended to do this in the following order: 1. stop SW360 (i.e. the tomcat)