gadenbuie / tweet-conf-dash

A shiny twitter conference dashboard
https://apps.garrickadenbuie.com/rstudioconf-2019/
MIT License
120 stars 75 forks source link

Error in gzfile(file, "rb") : invalid 'description' argument #3

Closed PatronMaster closed 4 years ago

PatronMaster commented 4 years ago

Hi Garrick,

This is amazing app. I tried run in my pc (Linux) and gave following error: Using tweets from: NA Getting Tweet oembed HTML, this may take a minute... Using {furrr} to speed up the process Error in gzfile(file, "rb") : invalid 'description' argument

It seems to be in the function

 tweets <- import_tweets(
    TWEETS_FILE,
    tz_global   = tz_global(),
    topic_terms = TOPIC$terms,
    start_date  = TWEETS_START_DATE,
    blocklist   = BLOCKLIST
)

> 
> 15.
> gzfile(file, "rb") 
> 14.
> readRDS(file) 
> 13.
> eval(lhs, parent, parent) 
> 12.
> eval(lhs, parent, parent) 
> 11.
> readRDS(file) %>% mutate(created_at = lubridate::with_tz(created_at, 
>     tz_global())) %>% tweets_since(TWEETS_START_DATE) %>% tweets_not_hashdump() %>% 
>     tweets_block(blocklist$status_id, blocklist$screen_name) %>% 
>     arrange(desc(created_at)) %>% is_topic_tweet(topic_terms) at functions.R#10
> 10.
> import_tweets(TWEETS_FILE, tz_global = tz_global(), topic_terms = TOPIC$terms, 
>     start_date = TWEETS_START_DATE, blocklist = BLOCKLIST) 
> 9.
> eval(lhs, parent, parent) 
> 8.
> eval(lhs, parent, parent) 
> 7.
> import_tweets(TWEETS_FILE, tz_global = tz_global(), topic_terms = TOPIC$terms, 
>     start_date = TWEETS_START_DATE, blocklist = BLOCKLIST) %>% 
>     filter(is_topic) %>% tweet_cache_oembed() at global.R#57
> 6.
> ..stacktraceon..({
>     library(shiny)
>     library(shinydashboard)
>     library(forcats) ... 
> 5.
> eval(exprs, envir) 
> 4.
> eval(exprs, envir) 
> 3.
> sourceUTF8(file.path.ci(appDir, "global.R")) 
> 2.
> appParts$onStart() 
> 1.
> runApp() 

Just one question what mean %||%? ( I never saw nothing like this). I found in %||% <- function(x,y)

gadenbuie commented 4 years ago

Do you have a collection of tweets stored in data/tweets.rds? It seems like you might not have collected tweets yet, which the app in the master branch of this repo doesn't do for you.

The %||% is called a null coalescing operator and x %||% y returns y is x is NULL.

PatronMaster commented 4 years ago

Thanks