This repository has been archived by the owner on Aug 13, 2021. It is now read-only.
Contest: write bad code, win a prize #141
Comments
|
Edit: I now noticed that ZeroDivisionError is not in the scope. Actual example: https://stackoverflow.com/questions/10198753/zero-division-error-in-python-uncertainties-package I did not check whether this issue was previously reported. |
|
I did not include ZeroDivisionError as I thought I had covered all cases, and never thought that someone would find another case. So, I consider this a valid entry, worth 2 points given the reference to StackOverflow. |
24 tasks
|
Kudos for already handling |
aroberge
added a commit
that referenced
this issue
Jan 26, 2021
aroberge
added a commit
that referenced
this issue
Feb 6, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Edit: The contest is now over. The winner is @Dominik1123.
Summary
Write code with ONE error that Friendly-traceback cannot properly analyze, in one of three categories:
SyntaxError: invalid syntaxSyntaxError: some message, wheresome messageis not recognized.NameError, AttributeError, ModuleNotFoundError, UnboundLocalError, ImportError, IndexError, KeyErrorthat is not recognized or is given an incorrect explanation by Friendly-traceback.Submitted issues about bugs for Friendly-traceback itself are also considered for this contest.
The prize
There will be one prize given drawn randomly from all eligible submissions. The prize consists of one ebook/pbook of your choice with a maximum value of 50 USD (including delivery for pbook) as long as I can order it and have it delivered to you. Alternatively, a donation for that amount to the open source project of your choice if it can be made using Paypal.
The details
Each valid issue will get one entry for the contest. Valid issues contain code that might be expected to be written by a beginner or advanced beginner. It excludes code that uses type annotations as well as the use of
asyncandawaitkeywords.The code is expected to contain ONE mistake only and not generate secondary exceptions.
The code can be run either using the friendly-console, or running in a Jupyter environment or from an editor as described in the documentation.
The code should not be run from
exec()oreval(), etc.For a given valid submission, a bonus entry will be given if a link can be provided to an actual example from a site (such as StackOverflow, /r/python or /r/learnpython, etc.) where a question had been asked prior to this contest.
Exceptions that are not recognized by Friendly-traceback or for which the explanation (in English or French) is wrong or misleading are considered to be valid issues. Friendly-traceback does not second-guess Python's messages: they are taken at face value even if they sometimes might initially lead to a wrong conclusion. However, in some cases, such as issue #144, it is possible to obtain more information "afer the fact" than that provided by Python, which is why this particular example is considered to be a valid entry for this contest.
Submissions that are considered to be duplicate of previously submitted cases (because they basically have the same cause) will not be considered.
Honor code
I would ask that you do not read the source of Friendly-traceback with the sole intent of finding ways to write code that is designed to lead it to provide incorrect explanation.
End of contest
The contest will end on Monday January 25, at 8 AM Atlantic Standard Time.
The text was updated successfully, but these errors were encountered: