duarteguilherme / congressbr

An R package that returns tidy data from the APIs of the Brazilian Federal Senate and Chamber of Deputies.
https://robertmyles.github.io/congressbr/
Other
43 stars 6 forks source link

CRAN errors #40

Closed RobertMyles closed 7 years ago

RobertMyles commented 7 years ago

I just got an email from CRAN, I'm guessing the Senate API must have been changed. I'll get into these ASAP, but if anyone else also wants to, be my guest 😸 .

Check Details

Version: 0.1.1 Check: examples Result: ERROR Running examples in ‘congressbr-Ex.R’ failed The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: sen_bills_update_types
> ### Title: Downloads and tidies information on the types of updates that
> ### can be applied to bills in the Federal Senate
> ### Aliases: sen_bills_update_types
> 
> ### ** Examples
> 
> sen_bills_update_types()
Error: `.x` is not a vector (NULL)
Execution halted 

Flavor: r-devel-linux-x86_64-debian-gcc

Version: 0.1.1 Check: data for non-ASCII characters Result: NOTE Note: found 1 marked UTF-8 string Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-patched-solaris-x86, r-release-osx-x86_64, r-oldrel-osx-x86_64

Version: 0.1.1 Check: examples Result: ERROR Running examples in ‘congressbr-Ex.R’ failed The error most likely occurred in:

> ### Name: sen_bills_situations
> ### Title: Downloads and tidies information on the possible situations a
> ### bill can be in
> ### Aliases: sen_bills_situations
> 
> ### ** Examples
> 
> sen_bills_situations()
Error: `.x` is not a vector (NULL)
Execution halted 

Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc

Version: 0.1.1 Check: re-building of vignette outputs Result: WARN Error in re-building vignettes: ... Loading required package: dplyr

Attaching package: 'dplyr'

The following objects are masked from 'package:stats':

 filter, lag

The following objects are masked from 'package:base':

 intersect, setdiff, setequal, union

Quitting from lines 71-72 (senate.Rmd) 
Error: processing vignette 'senate.Rmd' failed with diagnostics:
`.x` is not a vector (NULL)
Execution halted 

Flavor: r-devel-linux-x86_64-fedora-clang

Version: 0.1.1 Check: examples Result: ERROR Running examples in 'congressbr-Ex.R' failed The error most likely occurred in:

> ### Name: sen_plenary_leaderships
> ### Title: Returns information on leaderships in the Federal Senate
> ### Aliases: sen_plenary_leaderships
> 
> ### ** Examples
> 
> party_leaders <- sen_plenary_leaderships()
Error: `.x` is not a vector (NULL)
Execution halted 

Flavor: r-release-windows-ix86+x86_64

Version: 0.1.1 Check: re-building of vignette outputs Result: WARN Error in re-building vignettes: ... Loading required package: dplyr

Attaching package: 'dplyr'

The following objects are masked from 'package:stats':

 filter, lag

The following objects are masked from 'package:base':

 intersect, setdiff, setequal, union

Quitting from lines 44-47 (senate.Rmd) 
Error: processing vignette 'senate.Rmd' failed with diagnostics:
No data match your request. Have you checked the 'id' argument?
Execution halted 

Flavor: r-release-windows-ix86+x86_64

Version: 0.1.1 Check: examples Result: ERROR Running examples in 'congressbr-Ex.R' failed The error most likely occurred in:

> ### Name: sen_bills
> ### Title: Downloads and tidies information on the legislation in the
> ### Federal Senate
> ### Aliases: sen_bills
> 
> ### ** Examples
> 
> pls_5_2010 <- sen_bills(type = "PLS", number = 5, year = 2010)
Error in curl::curl_fetch_memory(url, handle = handle) : 
 Couldn't resolve host 'legis.senado.gov.br'
Calls: sen_bills ... request_fetch -> request_fetch.write_memory -> <Anonymous> -> .Call
Execution halted 

Flavor: r-oldrel-windows-ix86+x86_64

Version: 0.1.1 Check: re-building of vignette outputs Result: WARN Error in re-building vignettes: ... Loading required package: dplyr

Attaching package: 'dplyr'

The following objects are masked from 'package:stats':

 filter, lag

The following objects are masked from 'package:base':

 intersect, setdiff, setequal, union

Quitting from lines 29-30 (senate.Rmd) 
Error: processing vignette 'senate.Rmd' failed with diagnostics:
Couldn't resolve host 'legis.senado.gov.br'
Execution halted 

Flavor: r-oldrel-windows-ix86+x86_64

RobertMyles commented 7 years ago

Problems in:

-[] sen_commission_list.R -[] sen_plenary.R -[] sen_senator_details.R

jtrecenti commented 7 years ago

I cannot reproduce the problems. Maybe the server was temporarily down?

RobertMyles commented 7 years ago

Maybe, Julio! I'll have a look again today, I was getting problems with the functions in the R files above.

RobertMyles commented 7 years ago

Super weird...the first time you try a function, it gives an error. The second time, it's fine:

> sen_senator_commissions(id = 715)
Error in sen_senator_commissions(id = 715) : 
  No data match your request. Have you checked the 'id' argument?
> sen_senator_commissions(id = 715)
# A tibble: 12 x 13
   senator_id     senator_name             senator_party_name senator_party_abbr senator_state
        <chr>            <chr>                          <chr>              <chr>         <chr>
 1        715 Armando Monteiro Partido Trabalhista Brasileiro                PTB            PE
 2        715 Armando Monteiro Partido Trabalhista Brasileiro                PTB            PE
 3        715 Armando Monteiro Partido Trabalhista Brasileiro                PTB            PE
 4        715 Armando Monteiro Partido Trabalhista Brasileiro                PTB            PE
 5        715 Armando Monteiro Partido Trabalhista Brasileiro                PTB            PE
 6        715 Armando Monteiro Partido Trabalhista Brasileiro                PTB            PE
 7        715 Armando Monteiro Partido Trabalhista Brasileiro                PTB            PE
 8        715 Armando Monteiro Partido Trabalhista Brasileiro                PTB            PE
 9        715 Armando Monteiro Partido Trabalhista Brasileiro                PTB            PE
10        715 Armando Monteiro Partido Trabalhista Brasileiro                PTB            PE
11        715 Armando Monteiro Partido Trabalhista Brasileiro                PTB            PE
12        715 Armando Monteiro Partido Trabalhista Brasileiro                PTB            PE
# ... with 8 more variables: senator_commissions_name <chr>, senator_commissions_abbr <chr>,
#   senator_commissions_id <chr>, senator_commissions_house <chr>,
#   senator_commissions_participation <chr>, senator_commissions_date_joined <dttm>,
#   senator_positions_commission_desc <chr>, senator_positions_commission_date_start <dttm>
RobertMyles commented 7 years ago

These all seem fine now, I'm going to close this and upload the latest version to CRAN.