Sefism is free for learners. We are here to help you grow, one step at a time.Join for free
Sefism.
Other

Urdu Explanations for Python Errors with Classroom Error Analytics

Build a Python error enhancer that turns tracebacks into short, accurate explanations in Urdu and simple English, using hand-written rules rather than a language model, and gives teachers a dashboard of the errors their class hits most. It extends an open source project, adds Urdu, and runs a classroom study to see whether students fix errors faster.

Difficulty

Intermediate

A small team, or one strong student willing to learn something new.
Effort

1 semester · 2 students

Deliverables

7 to ship

4 optional extras

Suggested stack

Pythonfriendly-traceback (extended)gettext for translationsFastAPIPostgreSQLChart.js or a small React dashboard
A suggestion, not a requirement. Swap anything for what you already know.

What you should ship

  • An Urdu translation layer for an existing friendly error tool, covering at least the 30 most common novice errors
  • Rule-based explanations that name the exact variable, line and likely cause, with an example fix
  • A plug-in for IDLE, Thonny or a Jupyter kernel so students see the explanation where they run code
  • Opt-in, anonymised logging of error type, time to fix and repeated errors per session
  • A teacher dashboard showing the most frequent errors, the slowest to fix and students who are stuck
  • A classroom study comparing time to fix and repeated errors with and without enhanced messages
  • A short teacher guide on using the dashboard in lab sessions

If you have time left

  • Roman Urdu as a third language option
  • Explanations for common Java or C++ compiler errors used in first-year courses
  • Automatic grouping of errors by the lab exercise that caused them
  • An offline mode for labs with poor internet

The problem: error messages written for people who already understand them

In a first-year programming lab in Pakistan, many students are reading Python error messages in their second or third language. A message like TypeError: can only concatenate str (not "int") to str is clear to an experienced programmer and a wall of jargon to a beginner. Students either wait for a teaching assistant, paste the error into an AI tool and copy a fix they do not understand, or give up. Teachers have no view of which errors are stopping the class, so they cannot adjust the next lecture.

The cost is not only lost lab time. Students who spend a whole session stuck on a missing colon often decide that programming is not for them, and that early loss of confidence is hard to reverse. A message that explains the cause in the student's own language, without handing over the answer, keeps them working on the problem themselves.

What already exists and the gap

  • Python 3.10 onwards improved many error messages, with suggestions such as "Did you mean...". They are still English only and terse.
  • friendly-traceback, an open source project by André Roberge, explains Python tracebacks for beginners and is designed to be translated; its documentation lists English and French.
  • Thonny and some online judges give friendlier messages but no Urdu and no class-level analytics.
  • AI assistants explain errors but can be wrong, give away the fix and are not available in every lab.

The gap is accurate, rule-based explanations in Urdu, shown inside the tools students use, plus analytics that tell teachers where the class is stuck.

Inspiration

Effective compiler error message enhancement for novice programming students (Becker et al., Computer Science Education, 2016) built enhanced messages for Java in a first-year course and studied their effect on errors, repeated errors and errors per student. Later work has shown mixed results for enhanced messages, which makes a careful local study worthwhile. This project brings the idea to Python and Urdu speakers.

What you build

  • Students run their code as usual. When it fails, they see the normal traceback plus a short Urdu or English explanation: what went wrong, on which line, with which variable, and a tiny example of the fix pattern, not their own answer.
  • Teachers open a dashboard after a lab and see that, for example, 40 percent of the class hit an indentation error in exercise 3 and took an average of six minutes to fix it.
  • Course leads compare cohorts across semesters.

The technically interesting part

  • Accurate explanations without a language model. Inspect the traceback, the source line and the frame's local variables to name the exact cause. For a NameError, check for close spellings among defined names; for a TypeError on +, name the two types and the variables involved.
  • Translation that stays correct. Technical terms such as "string" and "list" need consistent Urdu or bilingual terms. Build a glossary with teachers and test it with students.
  • Right-to-left output in a terminal or notebook. Urdu in consoles and Jupyter output needs care with direction and fonts.
  • Measuring time to fix. Log, with consent, when an error first appears in a session and when the same code next runs successfully, without storing student code beyond what is needed.

How to evaluate it

  • Accuracy: for 300 real error cases from past labs, a teacher rates whether the explanation was correct and helpful.
  • Classroom study: two lab sections, one with enhanced messages and one without, for several weeks. Compare time to fix, repeated errors and help requests. Get approval from the department and consent from students.
  • Language preference: how often students choose Urdu, English or both.
  • Teacher value: interview teachers about whether the dashboard changed what they taught.

Suggested plan

  • Weeks 1 to 3: collect real errors from a past lab (with permission), study friendly-traceback's code and translation system.
  • Weeks 4 to 7: Urdu glossary, translations and new rule-based explanations for the top 30 errors.
  • Weeks 8 to 10: IDE or Jupyter plug-in, logging and dashboard.
  • Weeks 11 to 13: classroom study.
  • Weeks 14 to 15: analysis, report and demo.

Path to a product

Universities and schools across Pakistan teach Python in Urdu-medium and English-medium settings. Contributing the Urdu translation upstream helps thousands of learners, and the dashboard could become a small paid tool for coding schools and online courses. The project also shows teaching, research and open source skills together, which stands out for both industry and teaching assistant roles.

Scope warning

Do not build a new Python interpreter or replace tracebacks; add to them. Contribute translations upstream rather than forking if the maintainer agrees. Keep logging minimal, anonymous and opt-in, and get the study approved before you collect any data.

Learn what you need on Sefism

Get help with this idea

The hard parts are explanations that are always correct and a study design your department will approve. Tauseef can help you choose the first errors, plan the study and shape the work into a strong open source contribution. If you are new here, create a free account first.

Ideas and guidance, not finished projects

These are project ideas and scoping guidance, published free for students to use as a starting point. I do not build, write, or sell final-year projects, and I do not complete coursework for anyone. Take an idea, make it yours, and build it.

Not sure this one fits you?

I help students pick an idea that matches their skills and their deadline, then scope it down until it is finishable. Guidance only, never done for you.

Discuss this idea
Work with me

Stuck on something specific?

Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.