Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError upon executing any verb #320

Closed
gavanderhoorn opened this issue Feb 6, 2019 · 9 comments
Closed

TypeError upon executing any verb #320

gavanderhoorn opened this issue Feb 6, 2019 · 9 comments
Assignees
Labels

Comments

@gavanderhoorn
Copy link

gavanderhoorn commented Feb 6, 2019

Receiving a TypeError upon executing any very or plain bugzoo (v 2.1.24):

bugzoo build --help
Traceback (most recent call last):
  File "/home/user/bugzoo_venv/bin/bugzoo", line 6, in <module>
    from bugzoo.cli.app import main
  File "/home/user/bugzoo_venv/lib/python3.5/site-packages/bugzoo/__init__.py", line 2, in <module>
    from bugzoo.client import Client
  File "/home/user/bugzoo_venv/lib/python3.5/site-packages/bugzoo/client/__init__.py", line 4, in <module>
    from .bug import BugManager
  File "/home/user/bugzoo_venv/lib/python3.5/site-packages/bugzoo/client/bug.py", line 5, in <module>
    from ..core.bug import Bug
  File "/home/user/bugzoo_venv/lib/python3.5/site-packages/bugzoo/core/__init__.py", line 1, in <module>
    from .bug import Bug
  File "/home/user/bugzoo_venv/lib/python3.5/site-packages/bugzoo/core/bug.py", line 12, in <module>
    from .coverage import CoverageInstructions
  File "/home/user/bugzoo_venv/lib/python3.5/site-packages/bugzoo/core/coverage.py", line 29, in <module>
    class CoverageInstructions(object):
  File "/home/user/bugzoo_venv/lib/python3.5/site-packages/bugzoo/core/coverage.py", line 42, in CoverageInstructions
    ) -> Optional[Type['CoverageInstructions']]:
  File "/usr/lib/python3.5/typing.py", line 649, in __getitem__
    return Union[arg, type(None)]
  File "/usr/lib/python3.5/typing.py", line 552, in __getitem__
    dict(self.__dict__), parameters, _root=True)
  File "/usr/lib/python3.5/typing.py", line 512, in __new__
    for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
  File "/usr/lib/python3.5/typing.py", line 512, in <genexpr>
    for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
  File "/usr/lib/python3.5/typing.py", line 1077, in __subclasscheck__
    if super().__subclasscheck__(cls):
  File "/home/user/bugzoo_venv/lib/python3.5/abc.py", line 225, in __subclasscheck__
    for scls in cls.__subclasses__():
TypeError: descriptor '__subclasses__' of 'type' object needs an argument

Installed on an Ubuntu Xenial (16.04, amd64) machine "with the latest updates" using the following commands:

sudo apt install python3-dev
virtualenv --python=python3 $HOME/bugzoo_venv
source $HOME/bugzoo_venv/bin/activate
pip3 install bugzoo
@ChrisTimperley ChrisTimperley self-assigned this Feb 6, 2019
@gavanderhoorn
Copy link
Author

gavanderhoorn commented Feb 6, 2019

Tried v2.1.16, just to see if this is something with the latest release only. But then I get:

Traceback (most recent call last):
  File "/home/user/bugzoo_venv/lib/python3.5/site-packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/home/user/bugzoo_venv/lib/python3.5/site-packages/urllib3/connectionpool.py", line 354, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python3.5/http/client.py", line 1106, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python3.5/http/client.py", line 1151, in _send_request
    self.endheaders(body)
  File "/usr/lib/python3.5/http/client.py", line 1102, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python3.5/http/client.py", line 934, in _send_output
    self.send(msg)
  File "/usr/lib/python3.5/http/client.py", line 877, in send
    self.connect()
  File "/home/user/bugzoo_venv/lib/python3.5/site-packages/docker/transport/unixconn.py", line 42, in connect
    sock.connect(self.unix_socket)
PermissionError: [Errno 13] Permission denied

and a bunch more of those. Not sure what is going on.

On this machine my user is not a member of the docker group. Could that be related somehow?


Edit: related? #274.

@gavanderhoorn
Copy link
Author

gavanderhoorn commented Feb 6, 2019

2.1.19: Permission denied
2.1.20: TypeError

@ChrisTimperley
Copy link
Collaborator

Do you mind sharing your $ pip list with me?

@gavanderhoorn
Copy link
Author

With the venv active, or not?

@gavanderhoorn
Copy link
Author

With venv active:

Package          Version   
---------------- ----------
attrs            18.2.0    
bugzoo           2.1.24    
cement           3.0.2     
certifi          2018.11.29
chardet          3.0.4     
Click            7.0       
docker           3.7.0     
docker-pycreds   0.4.0     
dockerpty        0.4.1     
Flask            1.0.2     
gitdb2           2.0.5     
GitPython        2.1.11    
idna             2.8       
itsdangerous     1.1.0     
Jinja2           2.10      
MarkupSafe       1.1.0     
mypy-extensions  0.4.1     
pip              19.0.1    
pkg-resources    0.0.0     
psutil           5.5.0     
PyYAML           3.13      
requests         2.21.0    
setuptools       40.8.0    
six              1.12.0    
smmap2           2.0.5     
tabulate         0.8.3     
urllib3          1.24.1    
websocket-client 0.54.0    
Werkzeug         0.14.1    
wheel            0.32.3    

@gavanderhoorn
Copy link
Author

Just tried a different system (also Ubuntu Xenial (16.04, amd64) with the same procedure, and 2.1.24 also throws a TypeError.

@gavanderhoorn
Copy link
Author

Ok, just found Optional[Type[Foo]] raises TypeError in Python 3.5.2 on SO:

This is a bug in Python 3.5.2.

and sure enough:

$ python3 --version
Python 3.5.2

@gavanderhoorn
Copy link
Author

Installed Python 3.6 (from this ppa; couldn't quickly find any more sanctioned way to upgrade the 3.5.x Xenial comes with) the normal installation steps result in a venv with a working BugZoo.

Or at least: I now get a (probably expected) Permission denied error ($USER is not a member of docker group).

@ChrisTimperley: are you on Xenial on not using Ubuntu at all?

@gavanderhoorn
Copy link
Author

Seeing as this is a bug in Python and not BugZoo, I'll close this.

@ChrisTimperley: might be something to mention in the documentation / readme?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants