Erro no transform
carlsonwf opened this issue · 1 comments
carlsonwf commented
Estou começando agora a usar o minha-receita (fiz o build) e estou com problema ao importar.
Na etapa "Creating the JSON data for each CNPJ" em 2% ele dá a seguinte mensagem de erro:
Creating the JSON data for each CNPJ 2% |█ | (1589248/56832348, 18297 it/s) [7m36s:50m19s]panic: send on closed channel
goroutine 87012916 [running]:
github.com/cuducos/minha-receita/transform.(*venuesTask).produceRows.func1(0xc1297037a0, 0xc05420a120?)
C:/Users/W11/OneDrive/Documents/ItsBrain/Dev/Projetos/minha-receita/transform/venues.go:74 +0x72
created by github.com/cuducos/minha-receita/transform.(*venuesTask).produceRows
C:/Users/W11/OneDrive/Documents/ItsBrain/Dev/Projetos/minha-receita/transform/venues.go:56 +0x3b
panic: send on closed channel
goroutine 86438577 [running]:
github.com/cuducos/minha-receita/transform.(*venuesTask).produceRows.func1(0xc1297037a0, 0xc0001f89c0?)
C:/Users/W11/OneDrive/Documents/ItsBrain/Dev/Projetos/minha-receita/transform/venues.go:74 +0x72
created by github.com/cuducos/minha-receita/transform.(*venuesTask).produceRows
C:/Users/W11/OneDrive/Documents/ItsBrain/Dev/Projetos/minha-receita/transform/venues.go:56 +0x3b
panic: send on closed channel
goroutine 87012914 [running]:
github.com/cuducos/minha-receita/transform.(*venuesTask).produceRows.func1(0xc1297037a0, 0xc0ba2aa870?)
C:/Users/W11/OneDrive/Documents/ItsBrain/Dev/Projetos/minha-receita/transform/venues.go:74 +0x72
created by github.com/cuducos/minha-receita/transform.(*venuesTask).produceRows
C:/Users/W11/OneDrive/Documents/ItsBrain/Dev/Projetos/minha-receita/transform/venues.go:56 +0x3b
Verificando o log do postgres, encontrei o seguinte erro
2023-07-20 16:59:05.752 -03 [8452] ERROR: invalid byte sequence for encoding "UTF8": 0x00
2023-07-20 16:59:05.752 -03 [8452] CONTEXT: COPY cnpj, line 7431, column json
2023-07-20 16:59:05.752 -03 [8452] STATEMENT: copy "cnpj" ( "id", "json" ) from stdin binary;
2023-07-20 16:59:07.231 -03 [8452] LOG: could not receive data from client: An existing connection was forcibly closed by the remote host.
Infelizmente não conheço o Go, mas gostaria de ter alguma dica sobre como depurar esse problema ou, ainda, talvez buscar alguma outra base com os CNPJs, pois desconfio que o problema seja nesta base (obtive com o comando download)
cuducos commented
Vou fechar como duplicada e recomendar que continuemos a conversa aqui — o que te ajudar pode ajudar o @wandersonsousa e o que o ajudar pode te ajudar também ; )