CNPJ-full icon indicating copy to clipboard operation
CNPJ-full copied to clipboard

Erro de encoding

Open haggen opened this issue 5 years ago • 5 comments

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 avatar Oct 11 '19 14:10 haggen

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.

haggen avatar Oct 11 '19 14:10 haggen

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

andernunes avatar Jun 29 '20 15:06 andernunes

Esse problema persiste, após novos downloads?

fabioserpa avatar Oct 24 '20 12:10 fabioserpa

Farei nova tentativa e reporto em seguida. Grato.

andernunes avatar Oct 26 '20 12:10 andernunes

@andernunes, chegou a testar novamente? Funcionou?

fabioserpa avatar Jan 20 '21 22:01 fabioserpa