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

Erro de encoding #22

Open
haggen opened this issue Oct 11, 2019 · 5 comments
Open

Erro de encoding #22

haggen opened this issue Oct 11, 2019 · 5 comments

Comments

@haggen
Copy link

haggen commented Oct 11, 2019

Iniciando processamento em 2019-10-11 14:08:52.841146
Processando arquivo: ../DADOS_ABERTOS_CNPJ_01.zip
Traceback (most recent call last):
  File "cnpj.py", line 463, in <module>
    main()
  File "cnpj.py", line 455, in main
    cnpj_full(input_list, tipo_output, output_path)
  File "cnpj.py", line 229, in cnpj_full
    end='\r')
UnicodeEncodeError: 'ascii' codec can't encode character '\xe9' in position 11: ordinal not in range(128)
@haggen
Copy link
Author

haggen commented Oct 11, 2019

Eu estava numa sessão do tmux onde o locale não estava definido. Depois de um locale en_US.utf8 o script funcionou. De qualquer forma seria interessante não depender disso.

@andernunes
Copy link

Problema similar. Mas não consegui resolver com o locale:
python cnpj.py '/cnpj' csv '/dados' --dir
File "cnpj.py", line 229
end='\r')
^
SyntaxError: invalid syntax

locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Alguma ideia?
Obrigado

@fabioserpa
Copy link
Owner

Esse problema persiste, após novos downloads?

@andernunes
Copy link

Farei nova tentativa e reporto em seguida.
Grato.

@fabioserpa
Copy link
Owner

@andernunes, chegou a testar novamente? Funcionou?

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

3 participants