hawkerfun / cognito-csv-exporter

Amazon Cognito User Pool CSV exporter
105 stars 67 forks source link

Export Not Fully Exporting #10

Open mcorcelli opened 3 years ago

mcorcelli commented 3 years ago

I have been running this code to export from cognito.

python C:\Users\Asus-Desktop\Desktop\cognito-csv-exporter-master\CognitoUserToCSV.py --user-pool-id us-east-1_"XXXSHHGGH" -attr Username email phone_number name given_name family_name preferred_username cognito:user_status status sub custom:company_name custom:investment_size custom:investment_types custom:investment_sectors custom:firm_classification custom:job_title custom:phone_country custom:phone_type

There is a problem when I add given_name. I get the below response. I can get everything else from the database except all of the entries for given_name. I only return 4271 results and the export feature stops. Can someone help me to fix this?

Traceback (most recent call last): File "C:\Users\Asus-Desktop\Desktop\cognito-csv-exporter-master\CognitoUserToCSV.py", line 127, in csv_file.writelines(csv_lines) File "C:\Users\Asus-Desktop\AppData\Local\Programs\Python\Python39\lib\encodings\cp1252.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can't encode character '\u0151' in position 200: character maps to