sassoftware / sassoftware/pyviyatools
listgroupsandmembers.py fails when user name has non ascii characters
Open
@dwstern is already working on this.
Since Mar 9, 2022.
- Dominant language
- Python
- Stars
- 50
- Forks
- 42
- PR merge metrics
- No merged PRs in 30d
Description
When a user name has non ascii characters and script is used like:
python listgroupsandmembers.py > user-report.csv
It fails with the following message:
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf1' in position 86: ordinal not in range(128)
Probably not an elegant solution, but we fixed it adding ascii replace, so non ascii characters are replaced by "?" sign
membername=member['name']
membername=membername.encode('ascii', 'replace')
The reported issue does not appear when python listgroupsandmembers.py shows results on console.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.