Skip to content

swh cli client issue due to missing minimum python3 version runtime

Fix deposit client error:

I've created a metadata file and I've tried to use this command to upload my submission:

swh deposit upload --username ipol --password "mypassword"
--archive mlheIPOL.tgz
--collection 'ipol'
--metadata metadata_test1.xml

However I get the following error:

 Traceback (most recent call last):
   File "/home/user/ipol/testSHsubmission/python3env/bin/swh",
 line 5, in <module>
     from swh.core.cli import main
   File
 "/home/user/ipol/testSHsubmission/python3env/lib/python3.5/site-
 packages/swh/core/cli/__init__.py", line 14, in <module>
     from ..sentry import init_sentry
   File
 "/home/user/ipol/testSHsubmission/python3env/lib/python3.5/site-
 packages/swh/core/sentry.py", line 14
     return f'{main_package}@{version}'
                                      ^
 SyntaxError: invalid syntax

This could happen to any other public swh subcommands.

tl; dr f-string are python3.6 onwards. the user's venv is python3.5 thus the syntax error


Migrated from T2367 (view on Phabricator)

Edited by Phabricator Migration user