-
Notifications
You must be signed in to change notification settings - Fork 23
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
Replace sys.exit call with exception handling in crawlers #107
Conversation
Hi @m-appel - |
Thanks, the changes look good to me, I'm running a test right now, although I don't expect anything to fail. Please only fix the codestyle issues by (ideally) using the pre-commit hook as described here. |
Hi @m-appel - |
Yes please, it should have fixed a bunch of things by itself and as far as I can tell there is one unused import in the |
Hi @m-appel - |
In theory, the pre-commit hook should automatically update the files. However, you have to stage the changed files again, maybe that's the problem? The flow is usually as follows: git commit
# pre-commit hooks are running.
# If there was no failure the commit succeeds.
# If there was a fail due to changed files, you have to stage them again
git add <changed files>
git commit
# Now hooks should pass. Note that there are some instances (e.g., with |
Okay this is weird. I hereby give you special permission to deactivate the hooks with |
File "/.cache/pre-commit/repoxqr4119s/py_env-python3.12/lib/python3.12/site-packages/autopep8.py", line 761, in fix_e225
pycodestyle.missing_whitespace_around_operator(fixed, ts))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pycodestyle' has no attribute 'missing_whitespace_around_operator'. Did you mean: 'whitespace_around_operator'? I changed it to |
Ah, I think this is because the pre-commit autopep8 hook uses an old version. I updated this on the main branch... The function signature of pycodestyle changed some time ago and this was fixed in autopep8 2.0.3, but the pre-commit hook in your fork still used 2.0.2. If you fetch from upstream and merge the main branch into your PR branch (this should only update |
Everything went well, all checks have passed. I pushed the commit. Thank you @m-appel |
Hi @m-appel - |
Yeah, the github worker seems to do something different than the local version... In my version the isort worker failed as well, but the github action wants a different format. I think I'll just merge this and fix it on the main branch, I think somewhere there is a version mismatch in some file I don't understand. |
Thanks, this actually revealed a problem with the pre-commit integration, which I just fixed in cf73ea2. |
I would love to take up some more, thank you so much for helping me all along @m-appel |
Crawlers raise exception in case of fatal error instead of exiting the program
Description
In case of fatal error i.e
httperror
,jsondecodeerror
,missingkeyerror
,connectionerror
crawlers program were exited but instead now exception are raised and they are passed to thecreate_db.py
where the exceptions are handled. Created custom error types for consistency purposesMotivation and Context
fixes: issue #70
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: