Esri / Esri/ago-tools

createUserListCSV doesn't handle unicode and delimiters in FullName

Open
#28 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
90
Forks
85
PR merge metrics
No merged PRs in 30d

Description

The full name of a user might have unicode characters. These are not handled correctly at the moment.

dataWriter.writerow([user['fullName'], user['email'], user['username'], user['role'], time.strftime("%Y-%m-%d",time.gmtime(user['created']/1000))])
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 4: ordinal not in range(128)

The full name of a user might contain a delimiter character (such as a comma) so a csv.QUOTE_NONNUMERIC may be more appropriate.

Contributor guide

Open the contributing guide

Research direction

Start at createUserListCSV and reproduce the export with a fullName containing a Unicode character and a comma. The work is done when both names export without an encoding error and CSV fields containing delimiters remain intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.