Git Product home page Git Product logo

Comments (4)

wilsonfreitas avatar wilsonfreitas commented on September 14, 2024 3

Esse erro acontece toda vez que a API do SGS do Bacen fica fora.
Não tem o que fazer do lado do rbcb, a não ser colocar uma mensagem de erro pra ficar evidente que a API está indisponível.
Fora isso é aguardar que estabilize.

from rbcb.

wilsonfreitas avatar wilsonfreitas commented on September 14, 2024

Oi @victorrssx, foi um erro temporário, parece que já normalizou.
Obrigado pelo aviso.
Vou fechar essa issue, se voltar o problema, ela será reaberta.

from rbcb.

luketesser avatar luketesser commented on September 14, 2024

Venho encontrando o mesmo erro eventualmente:
Error in map():
ℹ In index: 1.
ℹ With name: ibcbr.
Caused by error in parse_con():
! lexical error: invalid char in json text.
<?xml version="1.0" encoding="p
(right here) ------^
Backtrace:

  1. └─rbcb::get_series(c(ibcbr = 24364))
  2. ├─rbcb::rbcb_get(objs, start_date, end_date, last)
  3. └─rbcb:::rbcb_get.sgs(objs, start_date, end_date, last)
  4. └─purrr::map_dfr(...)
    
  5.   └─purrr::map(.x, .f, ...)
    
  6.     └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
    
  7.       ├─purrr:::with_indexed_errors(...)
    
  8.       │ └─base::withCallingHandlers(...)
    
  9.       ├─purrr:::call_with_cleanup(...)
    
  10.       └─rbcb (local) .f(.x[[i]], ...)
    
  11.         └─rbcb:::sgs_create_series(ser, f)
    
  12.           └─jsonlite::fromJSON(json)
    
  13.             └─jsonlite:::parse_and_simplify(...)
    
  14.               └─jsonlite:::parseJSON(txt, bigint_as_char)
    
  15.                 └─jsonlite:::parse_con(txt, bigint_as_char)
    

from rbcb.

jgpds avatar jgpds commented on September 14, 2024

Também venho enfrentando o mesmo erro, esse erro acontecia esporadicamente e era resolvido quando rodava o código novamente, mas recentemente tá acontecendo mais frequentemente e não está resolvendo quando roda novamente. No meu caso, tem alguns meses que não é possível puxar o indexador e outros meses funciona normalmente.

> df_indexador_bcb <- rbcb::get_series(código_indexador, start_date = (as.Date(paste(ano_reavaliacao, mes_reavaliacao, dia_reavaliacao, sep = "-")) %m-% months(13)),
+                                      end_date = (as.Date(paste(ano_reavaliacao, mes_reavaliacao, dia_reavaliacao, sep = "-")) %m-% months(1))) # Últimas 12 Variações do indexador
Skipping download - using cached version
Error in `map()`:In index: 1.With name: 433.
Caused by error in `parse_con()`:
! lexical error: invalid char in json text.
                                       <?xml version="1.0" encoding="p
                     (right here) ------^
Run `rlang::last_trace()` to see where the error occurred.
> rlang::last_trace()
<error/purrr_error_indexed>
Error in `map()`:
ℹ In index: 1.
ℹ With name: 433.
Caused by error in `parse_con()`:
! lexical error: invalid char in json text.
                                       <?xml version="1.0" encoding="p
                     (right here) ------^
---
Backtrace:1. └─rbcb::get_series(...)
  2.   ├─rbcb::rbcb_get(objs, start_date, end_date, last)
  3.   └─rbcb:::rbcb_get.sgs(objs, start_date, end_date, last)
  4.     └─purrr::map_dfr(...)
  5.       └─purrr::map(.x, .f, ...)
  6.         └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
  7.           ├─purrr:::with_indexed_errors(...)
  8.           │ └─base::withCallingHandlers(...)
  9.           ├─purrr:::call_with_cleanup(...)
 10.           └─rbcb (local) .f(.x[[i]], ...)
 11.             └─rbcb:::sgs_create_series(ser, f)
 12.               └─jsonlite::fromJSON(json)
 13.                 └─jsonlite:::parse_and_simplify(...)
 14.                   └─jsonlite:::parseJSON(txt, bigint_as_char)
 15.                     └─jsonlite:::parse_con(txt, bigint_as_char)

from rbcb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.