JSON decode error while trying to use multiprocessing with tqdm

I'm trying to run the following code:

iqs_pool = Pool(processes=30)
lst = []

for obj in tqdm(iqs_pool.imap(f, df["col"]), total=len(df)):


Basically trying to apply the function f to the col column of df. The function f contains a line that runs the .json() method on a requests object returned via the requests.request function.

When I run this, I get the following exception:

JSONDecodeError                           Traceback (most recent call last)
<ipython-input-20-fc66deeabd09> in <module>
      2 lst = []
----> 4 for obj in tqdm(iqs_pool.imap(f, df["col"]), total=len(df)):
      5     lst.append(obj)

~/anaconda3/lib/python3.7/site-packages/tqdm/_tqdm_notebook.py in __iter__(self, *args, **kwargs)
    221     def __iter__(self, *args, **kwargs):
    222         try:
--> 223             for obj in super(tqdm_notebook, self).__iter__(*args, **kwargs):
    224                 # return super(tqdm...) will not catch exception
    225                 yield obj

~/anaconda3/lib/python3.7/site-packages/tqdm/_tqdm.py in __iter__(self)
   1015                 """), fp_write=getattr(self.fp, 'write', sys.stderr.write))
-> 1017             for obj in iterable:
   1018                 yield obj
   1019                 # Update and possibly print the progressbar.

~/anaconda3/lib/python3.7/multiprocessing/pool.py in next(self, timeout)
    746         if success:
    747             return value
--> 748         raise value
    750     __next__ = next                    # XXX

JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I then ran f sequentially on df rows:

lst = []
j = 0
for i in range(len(df)):
    j = i

So if the loop is terminated because of an error, I'll know which row of df is giving problems. I ran it four times, got the JSON Decode error all 4 times and got values of j as 11, 0, 0, 19. This makes no sense to me and I'm completely confused. If 0 was the problematic index, j should've taken that value all four times. If 19 was the first problematic index, then I shouldn't get any prior values of j at all.

So I tried one last thing:

lst = []
j = 0
for i in range(20):
    j = i

Note that I'm just running f on the zeroth row of df 20 times. The loop terminates with a JSON Decode error after the tenth iteration (j=10).

What is going on here?