Skip to content

Latest commit

 

History

History
177 lines (120 loc) · 3.56 KB

File metadata and controls

177 lines (120 loc) · 3.56 KB

Problem Tracker

📋 Table of Contents



🆔 011 - Test Problem


Status: ✅ Solved

Language: Python

Time Taken: 40m

🐞 Problem Description

async def views with ratelimit caused unawaited coroutine under WSGI, Django expected sync views.

async def search_view(request):\n    result = await engine.regular_search(...)

✅ Solution Description


Changed to regular def views and wrapped async calls with async_to_sync().
def search_view(request):\n    result = async_to_sync(engine.regular_search)(query)\n    return JsonResponse(...)



🆔 010 - Sync vs Async Django views


Status: ✅ Solved

Language: Python

Time Taken: 40m

🐞 Problem Description

async def views with ratelimit caused unawaited coroutine under WSGI, Django expected sync views.

async def search_view(request):\n    result = await engine.regular_search(...)

✅ Solution Description


Changed to regular def views and wrapped async calls with async_to_sync().
def search_view(request):\n    result = async_to_sync(engine.regular_search)(query)\n    return JsonResponse(...)



🆔 issue-005 - Incorrect JSON Parsing in Python


Status: ✅ Solved

Language: Python

Time Taken: 10 minutes

🐞 Problem Description

The JSON parser fails when reading a file with single quotes instead of double quotes.

import json
json.loads("{'key': 'value'}")

✅ Solution Description


Replaced single quotes with double quotes in JSON string.
json.loads('{"key": "value"}')



🆔 issue-004 - Permission Denied Error in Bash


Status: ✅ Solved

Language: Bash

Time Taken: 5 minutes

🐞 Problem Description

Script execution fails with 'Permission denied'. The script lacks execution permissions.

./myscript.sh

✅ Solution Description


Resolved by making the script executable using chmod.
chmod +x myscript.sh



🆔 issue-003 - Bash Script Fails with 'Command Not Found'


Status: ⏳ Pending

Language: Bash

Time Taken:

🐞 Problem Description

A command inside the script isn't recognized. It could be due to a missing package or incorrect path.

mycommand --option



🆔 issue-002 - Undefined Variable in JavaScript


Status: 🚫 Ignored

Language: Js

Time Taken:

🐞 Problem Description

ReferenceError: 'myVar' is not defined. Occurs when trying to use 'myVar' before declaration.

console.log(myVar);



🆔 issue-001 - SyntaxError in Python Script


Status: ⏳ Pending

Language: Python

Time Taken:

🐞 Problem Description

Running the script results in a SyntaxError due to a missing colon in an if-statement.

if x == 10
    print('X is 10')