@21natzil/

Debug Example

Python

No description

fork
loading
Files
  • main.py

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.7133254996732135","path":"main.py","file":{"path":"main.py","content":{"asEncoding":{"base64":"aW1wb3J0IHJlcXVlc3RzCgoKZGVmIGdldF9kYXRhKCk6CiAgd2l0aCByZXF1ZXN0cy5TZXNzaW9uKCkgYXMgc2Vzc2lvbjoKICAgIHdpdGggc2Vzc2lvbi5nZXQoZiJodHRwOi8vaHR0cGJpbi5vcmcvZW5jb2RpbmcvdXRmOCIpIGFzIHJlc3A6CiAgICAgIHJldHVybiByZXNwLmNvbnRlbnQuZGVjb2RlKCdhc2NpaScpCgpkZWYgaGFuZGxlX21hdGgobWluX251bWJlcjogaW50LCBtYXhfbnVtYmVyOiBpbnQpOgogIHRyeToKICAgIHByaW50KAogICAgICBnZXRfZGF0YSgpWzBdICogaW50KG1pbl9udW1iZXIgLyBtYXhfbnVtYmVyKQogICAgKQogICAgcmV0dXJuIChtaW5fbnVtYmVyIC8gbWF4X251bWJlcikKICBleGNlcHQ6CiAgICBwcmludCgiVGhlIG1heCBudW1iZXIgY2Fubm90IGJlIDAiKQoKbnVtYmVycyA9IFswLCAxLCAyLCAzXQoKZm9yIGkgaW4gcmFuZ2UobGVuKG51bWJlcnMpKToKICByID0gaGFuZGxlX21hdGgoNSwgMSkKICBudW1iZXJzLmluc2VydCgwLCByKQo="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import requests


def get_data():
  with requests.Session() as session:
    with session.get(f"http://httpbin.org/encoding/utf8") as resp:
      return resp.content.decode('ascii')

def handle_math(min_number: int, max_number: int):
  try:
    print(
      get_data()[0] * int(min_number / max_number)
    )
    return (min_number / max_number)
  except:
    print("The max number cannot be 0")

numbers = [0, 1, 2, 3]

for i in range(len(numbers)):
  r = handle_math(5, 1)
  numbers.insert(0, r)