CLI is not compatible with Python3

Bug #1978124 reported by Ekaterina Chernova
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
BaGPipe
Fix Released
Undecided
Ekaterina Chernova

Bug Description

Since urllib library changes in Python3 the following error occurred while executing bagpipe-looking-glass bgp routes:

Traceback (most recent call last):
  File "/var/lib/openstack/lib/python3.6/site-packages/networking_bagpipe/bagpipe_bgp/cli/looking_glass.py", line 156, in main
    response = urllib.request.urlopen(target_url)
AttributeError: module 'urllib' has no attribute 'request'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/var/lib/openstack/bin/bagpipe-looking-glass", line 8, in <module>
    sys.exit(main())
  File "/var/lib/openstack/lib/python3.6/site-packages/networking_bagpipe/bagpipe_bgp/cli/looking_glass.py", line 171, in main
    except urllib.error.HTTPError as e:
AttributeError: module 'urllib' has no attribute 'error'

Changed in networking-bagpipe:
assignee: nobody → Ekaterina Chernova (efedorova)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-bagpipe (master)
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/+/845271
Committed: https://opendev.org/openstack/networking-bagpipe/commit/07a04d771fce8030fdd5fc495b32af05ccec8815
Submitter: "Zuul (22348)"
Branch: master

commit 07a04d771fce8030fdd5fc495b32af05ccec8815
Author: Ekaterina Chernova <email address hidden>
Date: Thu Jun 9 16:41:36 2022 +0300

    Py3: Import urllib properly

    In py3 urllib was cut to several smaller pieces:
    urllib.error
    urllib.parse
    urllib.request

    Use this import format in lookingglass, impex2dot and rest_attach CLI,
    and in common.looking_glass module.

    Closes-Bug: #1978124
    Change-Id: I98bfd8cf6be882ff7115bf8f7140917476f02dd5

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.