Skip to content

FileType requires the encoding argument to be specified #6

@haadr

Description

@haadr

Hi there and thanks for a great script!

I ran into this today, which was solved by passing encoding="UTF-8" to the FileType constructor used by the metavar FILE (-o file option) and forcing the script to run in python3.

Traceback (most recent call last):
  File "./curl-auth-csrf.py", line 230, in <module>
    main()
  File "./curl-auth-csrf.py", line 217, in main
    args.output.write(result.content.decode('utf-8'))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe5' in position 182: ordinal not in range(128)```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions