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

utils.py has a bug #18

Open
xiaobaiyang-programer opened this issue Apr 8, 2020 · 0 comments
Open

utils.py has a bug #18

xiaobaiyang-programer opened this issue Apr 8, 2020 · 0 comments

Comments

@xiaobaiyang-programer
Copy link

xiaobaiyang-programer commented Apr 8, 2020

def utf8lize(obj):

    if isinstance(obj, dict):

        return {k: to_utf8(v) for k, v in obj.items()}



    if isinstance(obj, list):

        return [to_utf8(x) for x in ob]



    if instance(obj, str):

        return obj.encode('utf-8')



    return obj

should change return [to_utf8(x) for x in ob] to return [to_utf8(x) for x in obj] and ** if instance(obj, str):** should change to if isinstance(obj, str):

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

1 participant