yebinama / paclair

Paclair is a Python3 Cli tool to interact with Coreos's Clair (https://github.com/coreos/clair).
Apache License 2.0
27 stars 13 forks source link

Error when pushing image #21

Closed Qwertie- closed 4 years ago

Qwertie- commented 5 years ago

I installed paclair from pip and run paclair push alpine:latest and it failed with this error. I am running this on Fedora with the clair docker-compose config

$ paclair push alpine:latest
Traceback (most recent call last):
  File "/home/lukepicciau/.local/bin/paclair", line 11, in <module>
    load_entry_point('paclair==3.2.0', 'console_scripts', 'paclair')()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2793, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2411, in load
    return self.resolve()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2417, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/lukepicciau/.local/lib/python2.7/site-packages/paclair/__main__.py", line 4, in <module>
    from paclair.handler import PaClair
  File "/home/lukepicciau/.local/lib/python2.7/site-packages/paclair/handler.py", line 6, in <module>
    from paclair.config_reader import ConfigReader
  File "/home/lukepicciau/.local/lib/python2.7/site-packages/paclair/config_reader.py", line 2, in <module>
    from paclair.api.clair_requests_v1 import ClairRequestsV1
  File "/home/lukepicciau/.local/lib/python2.7/site-packages/paclair/api/clair_requests_v1.py", line 3, in <module>
    from paclair.api.abstract_clair_requests import AbstractClairRequests
  File "/home/lukepicciau/.local/lib/python2.7/site-packages/paclair/api/abstract_clair_requests.py", line 13, in <module>
    class AbstractClairRequests(LoggedObject):
  File "/usr/lib64/python2.7/abc.py", line 87, in __new__
    cls = super(ABCMeta, mcls).__new__(mcls, name, bases, namespace)
TypeError: Error when calling the metaclass bases
    a new-style class can't have only classic bases
yebinama commented 5 years ago

Hello,

It seems that you are using python2.7. Paclair is only compatible with python3.

Moreover there's something missing in your command, the correct one should be:

paclair Docker alpine:latest push