TypeError upon executing any verb
gavanderhoorn opened this issue · 9 comments
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
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.
2.1.19
: Permission denied
2.1.20
: TypeError
Do you mind sharing your $ pip list
with me?
With the venv active, or not?
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
Just tried a different system (also Ubuntu Xenial (16.04
, amd64
) with the same procedure, and 2.1.24
also throws a TypeError
.
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
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?
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?