Error in quantile.default(x, p = p) in EgdeR calcNormFactors
Ok, it turned out that some rows and/or columns contained all values as zeros and that was the reason for the error. I wrote a function to fix that:

def fix_rawcounts(rawcounts, cell_ids, gene_symbols):
    '''The function checks whether there are 
    any rows or columns with all zeros 
    and removes them'''
    print('Checking whether rows or columns contain all zeros')

    # Checking columns
    count_arr = np.apply_along_axis(np.count_nonzero, axis=0, arr=rawcounts )
    rawcounts = rawcounts[:,count_arr != 0]

    # Checking rows
    count_arr = np.apply_along_axis(np.count_nonzero, axis=1, arr=rawcounts )
    rawcounts = rawcounts[count_arr != 0,:]

    print('finished checking zero rows and columns')
    return rawcounts