Skip to content

ValueError when trying to register controllers #12

@dfurtado

Description

@dfurtado

When registering routes in files in the controllers folder, an unhandled exception is thrown.

Traceback (most recent call last):
  File "app.py", line 6, in <module>
    app.init_routes(prefix_routes=True)
  File "/home/daniel/Projects/Personal/pyterrier/pyterrier/pyterrier.py", line 115, in init_routes
    self._route_discovery.register_actions(prefix_routes)
  File "/home/daniel/Projects/Personal/pyterrier/pyterrier/core/route_discovery.py", line 62, in register_actions
    actions = self._prefix_routes(controller, actions)
  File "/home/daniel/Projects/Personal/pyterrier/pyterrier/core/route_discovery.py", line 83, in _prefix_routes
    for route, verb, func in actions:
ValueError: too many values to unpack (expected 3)

The issue is related to the addition of an extra parameter additional_methods in the decorators get, post, put, delete and patch

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions