Skip to content

UrlDispatcher error during constructing of url with regex parts #264

@imbolc

Description

@imbolc
>>> from aiohttp.web import UrlDispatcher
>>> disp = UrlDispatcher()
>>> disp.add_route('GET', '/{num:^\d+}', lambda x: x, name='name')
<DynamicRoute 'name' [GET] /{num:^\d+} -> <function <lambda> at 0x7f0223131840>
>>> disp['name'].url(parts={'num': '1'})
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/imbolc/.pyenv/versions/3.4.1/lib/python3.4/site-packages/aiohttp/web.py", line 1226, in url
    url = self._formatter.format_map(parts)
ValueError: Invalid format specifier



Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions