singularityhub / sregistry-cli

Singularity Global Client for container management
https://singularityhub.github.io/sregistry-cli/
Mozilla Public License 2.0
14 stars 18 forks source link

sregistry error when set "SREGISTRY_CLIENT=registry" #194

Closed sgabenov closed 5 years ago

sgabenov commented 5 years ago

sregistry-cli throws an error when set local sregistry

[root@test-vm1 sregistry]# sregistry
Traceback (most recent call last):
  File "/bin/sregistry", line 9, in <module>
    load_entry_point('sregistry==0.1.39', 'console_scripts', 'sregistry')()
  File "/usr/lib/python2.7/site-packages/sregistry-0.1.39-py2.7.egg/sregistry/client/__init__.py", line 310, in main
    from sregistry.main import Client as cli
  File "/usr/lib/python2.7/site-packages/sregistry-0.1.39-py2.7.egg/sregistry/main/__init__.py", line 118, in <module>
    Client = get_client()
  File "/usr/lib/python2.7/site-packages/sregistry-0.1.39-py2.7.egg/sregistry/main/__init__.py", line 64, in get_client
    elif SREGISTRY_CLIENT == 'registry': from .registry import Client
  File "/usr/lib/python2.7/site-packages/sregistry-0.1.39-py2.7.egg/sregistry/main/registry/__init__.py", line 16, in <module>
    from .auth import authorize
  File "/usr/lib/python2.7/site-packages/sregistry-0.1.39-py2.7.egg/sregistry/main/registry/auth.py", line 13, in <module>
    from sregistry.main.registry.utils import (
  File "/usr/lib/python2.7/site-packages/sregistry-0.1.39-py2.7.egg/sregistry/main/registry/utils.py", line 11, in <module>
    from datetime import datetime, timezone
ImportError: cannot import name timezone
[root@test-vm1 sregistry]#
[root@test-vm1 sregistry]#
[root@test-vm1 sregistry]#
[root@test-vm1 sregistry]# unset SREGISTRY_CLIENT
[root@test-vm1 sregistry]# sregistry

Singularity Registry Global Client v0.1.39 [hub]
usage: sregistry [-h] [--debug] [--quiet]
vsoch commented 5 years ago

You are missing a package. Try googling the error and seeing if you can figure it out!

sgabenov commented 5 years ago

python 2 dose not have datetime.timezone class. Only python 3.3+

vsoch commented 5 years ago

Yes the library does not support Python 2. It's long deprecated, you should try Python 3.

sgabenov commented 5 years ago

OK. Could you add to documentation python 3 as prerequisite to client

vsoch commented 5 years ago

Yes of course.