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: unsupported operand type(s) for /: 'float' and 'NoneType'" #102

Open
sajith opened this issue Oct 24, 2022 · 0 comments
Open
Assignees
Labels
bug Something isn't working ci/cd

Comments

@sajith
Copy link
Member

sajith commented Oct 24, 2022

Suppose the topology we've passed on to TEManager contains no residual_bandwidth values attached to its links. This will result in an error:

Traceback (most recent call last):
  File "./sdx-controller/venv/lib/python3.9/site-packages/flask/app.py", line 2525, in wsgi_app
    response = self.full_dispatch_request()
  File "./sdx-controller/venv/lib/python3.9/site-packages/flask/app.py", line 1822, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "./sdx-controller/venv/lib/python3.9/site-packages/flask/app.py", line 1820, in full_dispatch_request
    rv = self.dispatch_request()
  File "./sdx-controller/venv/lib/python3.9/site-packages/flask/app.py", line 1796, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "./sdx-controller/venv/lib/python3.9/site-packages/connexion/decorators/decorator.py", line 68, in wrapper
    response = function(request)
  File "./sdx-controller/venv/lib/python3.9/site-packages/connexion/decorators/uri_parsing.py", line 149, in wrapper
    response = function(request)
  File "./sdx-controller/venv/lib/python3.9/site-packages/connexion/decorators/validation.py", line 196, in wrapper
    response = function(request)
  File "./sdx-controller/venv/lib/python3.9/site-packages/connexion/decorators/parameter.py", line 120, in wrapper
    return function(**kwargs)
  File "./sdx-controller/swagger_server/controllers/connection_controller.py", line 202, in place_connection
    temanager = TEManager(topology_data, connection_data)
  File "./sdx-controller/venv/lib/python3.9/site-packages/sdxdatamodel/topologymanager/temanager.py", line 43, in __init__
    self.graph = self.generate_graph_te()
  File "./sdx-controller/venv/lib/python3.9/site-packages/sdxdatamodel/topologymanager/temanager.py", line 71, in generate_graph_te
    graph = self.manager.generate_graph()
  File "./sdx-controller/venv/lib/python3.9/site-packages/sdxdatamodel/topologymanager/manager.py", line 222, in generate_graph
    edge["weight"] = 1000.0 * (1.0 / link.residual_bandwidth)
TypeError: unsupported operand type(s) for /: 'float' and 'NoneType'

Related to atlanticwave-sdx/sdx-controller#25.

@sajith sajith added bug Something isn't working ci/cd labels Oct 24, 2022
@sajith sajith self-assigned this Oct 24, 2022
@sajith sajith linked a pull request Mar 22, 2023 that will close this issue
@sajith sajith transferred this issue from atlanticwave-sdx/datamodel Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ci/cd
Projects
Status: In Progress
Development

No branches or pull requests

1 participant