[autosubmit 4] autosubmit install error: Trace: script argument must be unicode
Follow up after #866 (closed). This is the same issue that I have on my Ubuntu 22.04 LTS.
In a newly created Docker container with the base image python:3.7.3
, I have cloned autosubmit, checked out the 4.0-branch-2022 branch, and successfully installed the dependencies locally with pip install -e .
.
The autosubmit configure
runs fine:
root@6ff1e03a36cd:/autosubmit# autosubmit configure
Writing configuration file...
Configuration file written successfully:
/root/.autosubmitrc
Directories configured successfully:
/root/autosubmit
/root/autosubmit
/root/autosubmit/logs
/root/autosubmit/metadata/structures
/root/autosubmit/metadata/data
/root/autosubmit/metadata/logs
But autosubmit install
gives me the following error:
root@6ff1e03a36cd:/autosubmit# autosubmit install
Creating autosubmit database...
[ERROR] Trace: script argument must be unicode.
[CRITICAL] Unhandled error: If you see this message, please report it in Autosubmit's GitLab project
This critical error appears in the logs, but the database is created:
oot@6ff1e03a36cd:/autosubmit# autosubmit install
Creating autosubmit database...
[ERROR] Trace: script argument must be unicode.
[CRITICAL] Unhandled error: If you see this message, please report it in Autosubmit's GitLab project
root@6ff1e03a36cd:/autosubmit# ls -lah ~/autosubmit/
total 16K
drwxr-xr-x 4 root root 4.0K Sep 19 09:36 .
drwx------ 1 root root 4.0K Sep 19 09:36 ..
-rw-r--r-- 1 root root 0 Sep 19 09:36 autosubmit.db
drwxr-xr-x 2 root root 4.0K Sep 19 09:36 logs
drwxr-xr-x 5 root root 4.0K Sep 19 09:36 metadata
On my local laptop, I had fixed it some time ago with this diff (line numbers may have changed after the last commits), but not sure if that's the best fix as I didn't dig into the issue to see where it was coming from, or if it impacted other parts of the code:
diff --git a/autosubmit/autosubmit.py b/autosubmit/autosubmit.py
index aac478cd..2557b9f7 100644
--- a/autosubmit/autosubmit.py
+++ b/autosubmit/autosubmit.py
@@ -3754,7 +3754,7 @@ class Autosubmit:
"""
if not os.path.exists(BasicConfig.DB_PATH):
Log.info("Creating autosubmit database...")
- qry = resource_string('autosubmit.database', 'data/autosubmit.sql')
+ qry = resource_string('autosubmit.database', 'data/autosubmit.sql').decode('UTF-8')
if not create_db(qry):
raise AutosubmitCritical("Can not write database file", 7004)
Log.result("Autosubmit database created successfully")
(last issue for today