-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Crashes on praw.exceptions #782
base: development
Are you sure you want to change the base?
Fix: Crashes on praw.exceptions #782
Conversation
Hi, thanks for the PR. We require tests to be added that cover any new additions to the code. If you could add tests in the relevant locations that show a test failing due to those errors that then passes when you add the fix, I can merge this PR! |
As Python is none of my main languages and I'm not familiar with Python tests I don't know how to write a test for it. Actually I don't see it as a code addition but the required checking for the second exception what was forgotten before. |
I can, but it will need to wait until I have the time. And it is a code addition, and fixes a bug. Therefore it needs tests to make sure that it doesn't reoccur. |
Of course, thanks. |
@thomas694 I'm getting to this now, in the logs you've censored the comments that caused this issue. Can you please supply them? |
"No data": "Invalid URL": |
Thank you. |
Downloading a subreddit and additionally specifying a list with (valid, but partially older) submission ids like
bdfr clone --subreddit ... --include-id-file Z:/ID_list.txt Z:/Reddit
crashes on download of some submissions.Example exceptions:
praw/docs/code_overview/exceptions.rst says:
"In addition to exceptions under the
praw.exceptions
namespace shown below,exceptions might be raised that inherit from
prawcore.PrawcoreException
."The code uses
praw
but doesn't catch both base exceptions at all relevant locations like cloner.py#L28The fix catches both base exceptions at all locations where they haven't been caught both yet
and lets the run finish even if for some things an error is thrown.
Fixes #764 too, resolves #713.