AttributeError: 'str' object has no attribute 'decode'
CameronVetter opened this issue · 1 comments
CameronVetter commented
I'm attempting to follow the quick-start instructions on the front page. After numerous problems using the latest versions of TensorFlow, I've carefully tried to match your test environment listed at the bottom of the page. After successfully converting all of the models. When I try to use the default model with the call:
python yolo.py --image
I get the following error:
AttributeError: 'str' object has no attribute 'decode'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "yolo.py", line 437, in <module>
main()
File "yolo.py", line 409, in main
yolo = YOLO_np(**vars(args))
File "yolo.py", line 69, in __init__
self.yolo_model = self._generate_model()
File "yolo.py", line 104, in _generate_model
assert yolo_model.layers[-1].output_shape[-1] == \
UnboundLocalError: local variable 'yolo_model' referenced before assignment
My package versions are:
Package Version
------------------- -------------------
asn1crypto 0.24.0
attrs 17.4.0
Automat 0.6.0
blinker 1.4
certifi 2018.1.18
chardet 3.0.4
click 6.7
cloud-init 18.5
colorama 0.3.7
command-not-found 0.3
configobj 5.0.6
constantly 15.1.0
cryptography 2.1.4
Cython 0.29.28
distro-info 0.18ubuntu0.18.04.1
httplib2 0.9.2
hyperlink 17.3.1
idna 2.6
incremental 16.10.1
Jinja2 2.10
jsonpatch 1.16
jsonpointer 1.10
jsonschema 2.6.0
keyring 10.6.0
keyrings.alt 3.0
language-selector 0.1
MarkupSafe 1.0
netifaces 0.10.4
numpy 1.13.3
oauthlib 2.0.6
PAM 0.4.2
pip 21.3.1
pyasn1 0.4.2
pyasn1-modules 0.2.1
pycrypto 2.6.1
PyGObject 3.26.1
PyJWT 1.5.3
pyOpenSSL 17.5.0
pyserial 3.4
python-apt 1.6.4
python-debian 0.1.32
pyxdg 0.25
PyYAML 3.12
requests 2.18.4
requests-unixsocket 0.1.5
SecretStorage 2.3.1
service-identity 16.0.0
setuptools 39.0.1
six 1.11.0
ssh-import-id 5.7
systemd-python 234
Twisted 17.9.0
ufw 0.36
unattended-upgrades 0.1
urllib3 1.22
wheel 0.30.0
zope.interface 4.3.2
It seems like the requirements.txt could use some updating to force appropriate versions. I'd do the PR myself but I can't figure out what version I have wrong.
CameronVetter commented
It seems just posting this was enough to help me realize what I was missing. I had to downgrade h5py to 2.10.0 as well.