Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

listgroupsandmembers.py fails when user name has non ascii characters #69

Open
iyepes opened this issue Feb 10, 2021 · 0 comments
Open
Assignees

Comments

@iyepes
Copy link

iyepes commented Feb 10, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants