Skip to content

Can`t catch aiohttp.InvalidURL #5450

Answered by Dreamsorcerer
MichaelDc86 asked this question in Q&A
Discussion options

You must be logged in to vote

Maybe you need to read the TypeError. :P

foo()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 2, in foo
TypeError: __init__() missing 1 required positional argument: 'url'

Fixed code:

def foo():
    raise aiohttp.InvalidURL("https://invalid.invalid")

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@MichaelDc86
Comment options

Answer selected by MichaelDc86
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants