Skip to content

Getting error when saving a dataframe #76

@MilesAheadAlso

Description

@MilesAheadAlso

I suspect it is something that I have not configured correctly, but I cannot see what it might be. My code is below:

options(googleAuthR.scopes.selected = "https://www.googleapis.com/auth/devstorage.full_control")
googleAuthR::gar_auth()
proj <- "xyz-r-forecasting"
bucket <- "xyz-r-forecast"
buckets <- gcs_list_buckets(proj)  #Returns correct result
bucket_info <- gcs_get_bucket(bucket)  #Returns correct result
objects <- gcs_list_objects(bucket)   #Returns correct result
gcs_save(RRPayLoad, file = "RRPayLoad", bucket = gcs_get_bucket(bucket), envir = parent.frame())
#Returns error below

The last statement returns the error below.

Request Status Code: 411
Error : lexical error: invalid char in json text.
                                       <!DOCTYPE html> <html lang=en> 
                     (right here) ------^

Error: lexical error: invalid char in json text.
                                       <!DOCTYPE html> <html lang=en> 
                     (right here) ------^
In addition: Warning message:
No JSON content found in request

The dataframe RRPayLoad is below.

  Offset Method    Category     ForecastItem       Date Forecast
1      6   BSTS Statistical 1001936040|NE_US 2017-07-01        0
2      6   BSTS Statistical 1001936040|NE_US 2017-08-01        0
3      6   BSTS Statistical 1001936040|NE_US 2017-09-01        0
4      6   BSTS Statistical 1001936040|NE_US 2017-10-01        0
5      6   BSTS Statistical 1001936040|NE_US 2017-11-01        0
6      6   BSTS Statistical 1001936040|NE_US 2017-12-01        0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions