Comments (4)
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.
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.
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:
▆
- └─rbcb::get_series(c(ibcbr = 24364))
- ├─rbcb::rbcb_get(objs, start_date, end_date, last)
- └─rbcb:::rbcb_get.sgs(objs, start_date, end_date, last)
-
└─purrr::map_dfr(...)
-
└─purrr::map(.x, .f, ...)
-
└─purrr:::map_("list", .x, .f, ..., .progress = .progress)
-
├─purrr:::with_indexed_errors(...)
-
│ └─base::withCallingHandlers(...)
-
├─purrr:::call_with_cleanup(...)
-
└─rbcb (local) .f(.x[[i]], ...)
-
└─rbcb:::sgs_create_series(ser, f)
-
└─jsonlite::fromJSON(json)
-
└─jsonlite:::parse_and_simplify(...)
-
└─jsonlite:::parseJSON(txt, bigint_as_char)
-
└─jsonlite:::parse_con(txt, bigint_as_char)
from rbcb.
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)
- Error in get_currency HOT 2
- Problem on get_annual_market_expectations HOT 3
- Indic "Taxa de câmbio" is not avaliable HOT 4
- Unable to get monthly market expectations HOT 1
- Error in 'get_annual_market_expectations' HOT 11
- Timeout Connection
- Error on Installation: Unable to Collate and Parse HOT 2
- Error when installing from devtools::install_github() HOT 2
- Problema ao puxar a Selic HOT 2
- Mudança Expectativas de Mercado - Selic HOT 5
- start_date and end_date arguments
- Implement pkgdown HOT 1
- rbcb aliases
- Implement cache HOT 1
- Implement OData interface
- Examples
- indic <- c("PIB Total", "Fiscal") HOT 1
- Issue BCB API Request Error 500 HOT 1
- Importing quarterly data as ts HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rbcb.