You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
raiseValueError('Can\'t build URL with "scheme" but without "host".')
From my perspective, URL with a scheme and without a host is valid:
In [12]: u = URL("scheme://")
In [13]: u.scheme, u.host
Out[13]: ('scheme', None)
In [14]: URL.build(scheme=u.scheme, host=u.host)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-14-c54f9b7a765d> in <module>
----> 1 URL.build(scheme=u.scheme, host=u.host)
...
200
201 if not host and scheme:
--> 202 raise ValueError('Can\'t build URL with "scheme" but without "host".')
203 if port and not host:
204 raise ValueError('Can\'t build URL with "port" but without "host".')
ValueError: Can't build URL with "scheme" but without "host".
The text was updated successfully, but these errors were encountered:
Why does
URL.build
has this check:yarl/yarl/__init__.py
Lines 201 to 202 in 5ef628f
From my perspective, URL with a scheme and without a host is valid:
The text was updated successfully, but these errors were encountered: