small bug fix reading parquet files
This commit is contained in:
@@ -31,6 +31,7 @@ import dask.dataframe as dd
|
||||
from dask.delayed import delayed
|
||||
import pyarrow.parquet as pq
|
||||
import pyarrow as pa
|
||||
|
||||
from pyarrow.lib import ArrowInvalid
|
||||
|
||||
from django.utils import timezone
|
||||
@@ -2379,7 +2380,7 @@ def read_df_sql(id):
|
||||
try:
|
||||
f = 'media/strokedata_{id}.parquet.gz'.format(id=id)
|
||||
df = pd.read_parquet(f)
|
||||
except OSError:
|
||||
except (OSError,ArrowInvalid):
|
||||
rowdata,row = getrowdata(id=id)
|
||||
if rowdata and len(rowdata.df):
|
||||
data = dataprep(rowdata.df,id=id,bands=True,otwpower=True,barchart=True)
|
||||
|
||||
Reference in New Issue
Block a user