TypeError: a bytes-like object is required, not 'str'

Bug #1978391 reported by Junbo Jiang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
BaGPipe
Fix Released
Undecided
Junbo Jiang

Bug Description

2022-06-12 10:06:47.898 8226 ERROR networking_bagpipe.bagpipe_bgp.engine.exabgp_peer_worker.10-4-1-11 [-] Exception while generating message for route evpn:multicast::10
.4.1.96:0:0:10.4.1.96 extended-community [ target:64512:755 encap:VXLAN ] pmsi pmsi:ingressreplication:0:0(755):10.4.1.96: TypeError: sequence item 0: expected str insta
nce, bytes found
2022-06-12 10:06:47.898 8226 ERROR networking_bagpipe.bagpipe_bgp.engine.exabgp_peer_worker.10-4-1-11 Traceback (most recent call last):
2022-06-12 10:06:47.898 8226 ERROR networking_bagpipe.bagpipe_bgp.engine.exabgp_peer_worker.10-4-1-11 File "/opt/networking-bagpipe/networking_bagpipe/bagpipe_bgp/engi
ne/exabgp_peer_worker.py", line 372, in _update_for_route_event
2022-06-12 10:06:47.898 8226 ERROR networking_bagpipe.bagpipe_bgp.engine.exabgp_peer_worker.10-4-1-11 return ''.join(r.messages(self.protocol.negotiated))
2022-06-12 10:06:47.898 8226 ERROR networking_bagpipe.bagpipe_bgp.engine.exabgp_peer_worker.10-4-1-11 TypeError: sequence item 0: expected str instance, bytes found
2022-06-12 10:06:47.898 8226 ERROR networking_bagpipe.bagpipe_bgp.engine.exabgp_peer_worker.10-4-1-11
2022-06-12 10:06:47.898 8226 DEBUG networking_bagpipe.bagpipe_bgp.engine.exabgp_peer_worker.10-4-1-11 [-] Sending 0 bytes on socket to peer 10.4.1.11 _send /opt/networki
ng-bagpipe/networking_bagpipe/bagpipe_bgp/engine/exabgp_peer_worker.py:357
2022-06-12 10:06:47.899 8226 ERROR networking_bagpipe.bagpipe_bgp.engine.exabgp_peer_worker.10-4-1-11 [-] Was not able to send data: TypeError: a bytes-like object is required, not 'str'

Junbo Jiang (junbo)
Changed in networking-bagpipe:
assignee: nobody → junbo (junbo)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-bagpipe (master)
Changed in networking-bagpipe:
status: New → In Progress
Revision history for this message
Lajos Katona (lajos-katona) wrote :

Thanks for the bug report. Could you please give some context how you reproduced the above stactrace? What kind of config you used, and things like that?

Revision history for this message
Junbo Jiang (junbo) wrote :
Download full text (8.9 KiB)

I use master branch, all configuration are just regular.

when you boot instance, the bagpipe-bgp process give the error.

here is the pip list output

Package Version Editable project location
---------------------------- ------------- -------------------------
alembic 1.8.0
amqp 5.1.1
aniso8601 9.0.1
appdirs 1.4.4
asgiref 3.5.2
attrs 21.4.0
automaton 2.5.0
autopage 0.5.1
Babel 2.10.1
bcrypt 3.2.2
beautifulsoup4 4.11.1
cachetools 5.2.0
castellan 3.11.0
certifi 2022.5.18.1
cffi 1.15.0
charset-normalizer 2.0.12
click 8.1.3
cliff 3.10.1
cmd2 2.4.1
cryptography 36.0.2
cursive 0.2.2
debtcollector 2.5.0
decorator 5.1.1
defusedxml 0.7.1
designate 14.1.0.dev60 /opt/designate
distlib 0.3.4
Django 3.2.13
django-appconf 1.0.5
django-compressor 2.4.1
django-debreach 2.1.0
django-pyscss 2.0.2
dnspython 2.2.1
dogpile.cache 1.1.5
edgegrid-python 1.2.1
elementpath 2.5.3
enmerkar 0.7.1
eventlet 0.33.1
exabgp 4.2.18
extras 1.0.0
fasteners 0.17.3
filelock 3.7.1
fixtures 3.0.0
Flask 2.1.2
Flask-RESTful 0.3.9
futurist 2.4.1
glance 25.0.0.dev61
glance-store 4.0.0
greenlet 1.1.2
horizon 22.1.0
httplib2 0.20.4
idna 3.3
importlib-metadata 4.11.4
importlib-resources 5.7.1
iso8601 1.0.2
itsdangerous 2.1.2
Jinja2 3.1.2
jmespath 1.0.0
jsonpatch 1.32
jsonpointer 2.3
jsonschema 3.2.0
keystone 21.1.0.dev19 /opt/keystone
keystoneauth1 4.6.0
keystonemiddleware 9.5.0
kombu 5.2.4
libvirt-python 8.4.0
logutils 0.3.5
lxml 4.9.0
Mako 1.2.0
MarkupSafe 2.1.1
microversion-parse 1.0.1
monasca-statsd 2.4.0
msgpack 1.0.3
munch 2.5.0
ndg-httpsclient 0.5.1
netaddr 0.8.0
netifaces 0.11.0
networking-bagpipe 16.1.0.dev9 /opt/networking-bagpipe
networking-bgpvpn 16.0.0
networking-sfc 14.0.0
networkx 2.8.2
neutro...

Read more...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-bagpipe (master)

Reviewed: https://review.opendev.org/c/openstack/networking-bagpipe/+/845495
Committed: https://opendev.org/openstack/networking-bagpipe/commit/3679a5a60590022df10ea7438e197e89c72d6655
Submitter: "Zuul (22348)"
Branch: master

commit 3679a5a60590022df10ea7438e197e89c72d6655
Author: junbo <email address hidden>
Date: Sun Jun 12 10:19:05 2022 +0800

    Fix .join() issue for bytes type

    Closes-Bug: #1978391
    Change-Id: I1fc8f71429e6b3b3f350f1b25030807e05ae660b

Changed in networking-bagpipe:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/networking-bagpipe 17.0.0.0rc1

This issue was fixed in the openstack/networking-bagpipe 17.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.