i am trying to write a script that takes a text file and converts it into a json file:

the text file in question has the following contents:

```
Mango
800 lbs
Mango contains higher levels of vitamin C than ordinary fruits. Eating mango can also reduce cholesterol and triglycerides,and help prevent cardiovascular disease. Due to its high level of vitamins, regular consumption of mango play an important role in improving body function and moisturizing the skin.

```

the json file must have the following format

```
{"name": "Mango", "weight": 800, "description": "Mango contains higher levels of vitamin C than ordinary fruits. Eating mango can also reduce cholesterol and triglycerides,and help prevent cardiovascular disease. Due to its high level of vitamins, regular consumption of mango play an important role in improving body function and moisturizing the skin.", "image_name": "010.jpeg"}

```

here is my code: 

```
import json

# the file to be converted to
# json format
filename = 'descriptions.txt'

fields = ["name", "weight", "descriptions"]

# dictionary where the lines from
# text will be stored
dict1 = {}

# creating dictionary
with open(filename) as fh:
    i = 0

    for line in fh:

        # reads each line and trims of extra the spaces
        # and gives only the valid words

        description = line.strip().split(None, 1)

        print(description)

        while i < len(fields):
            dict1[fields[i]] = description[i]
            i += 1

out_file = open("test1.json", "w")
json.dump(dict1, out_file, indent = 4, sort_keys = False)
out_file.close()

```

when i run the code, i am getting the error message "IndexError: list index out of range".

Another specification is that the weight field must only display the number 800 without the "lbs" part

Can someone please tell me what i did wrong?

best regards

Nicholas Monteiro Vital