Relative Content

Tag Archive for pythonflaskpostman

Maximum recursion depth exceeded issue in postman

def inactive_customer_cohorts(startDate, endDate): try: print(“startDate : “, startDate) print(“endDate : “, endDate) df = data_util.get_customer_scans_df(startDate, endDate) columns = [‘userId’, ‘createdAt’] df = df[columns] df[‘scanQuater’] = (‘Q’ + df[‘createdAt’].dt.quarter.astype(str) + ‘/’ + df[‘createdAt’].dt.year.astype(str)) quartersMap = dict(zip(df[‘scanQuater’].unique(), range(len(df[‘scanQuater’].unique())))) scanQuarterUsers = df.groupby(‘scanQuater’)[‘userId’].apply(list).reset_index() scanQuarterUsers[‘length’] = scanQuarterUsers[‘userId’].apply(len) quarterUsers = {row[‘scanQuater’]: row[‘userId’] for _, row in scanQuarterUsers.iterrows()} quarters = list(quartersMap.keys()) cumulativePreviousUserIds […]

Docx with image files is not sending in postman

I built my project on Flask. It has one part that uploads docx extension file and two fields in post request. It is working well. However, when I send docx file that contains images, flask project cannot see the file in the request. I have tried to send docx file with image using JetBrains’ HTTP Client feature, it worked well.
I will provide below all necessary codes and images related to my problem: