TransWikia.com

How do I import InvalidURL exception in praw for python?

Stack Overflow Asked by Johannes Pertl on November 12, 2021

I’m not able to import InvalidURL exception like this:

from praw.exceptions import ClientException, InvalidURL

ClientException exists, but InvalidURL doesn’t for some reason.

The exception is there in the documentation and github repo.

One Answer

According to the git blame, the InvalidURL class was added to the codebase about 6 months ago. As @DeepSpace suggests, upgrading praw to the latest release using pip install -U praw should do the trick. (Please note that -U is the same as --upgrade.)

Answered by MattDMo on November 12, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP