Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash at Install dependencies stage during Build #79

Closed
kennylee15 opened this issue Mar 25, 2021 · 6 comments
Closed

Crash at Install dependencies stage during Build #79

kennylee15 opened this issue Mar 25, 2021 · 6 comments
Assignees

Comments

@kennylee15
Copy link
Collaborator

There's another problem with dependencies. Github is having an issue installing rJava during the build operation.

https://github.com/jtr13/cc21/runs/2197491549

I've been investigating but could not figure out a solution yet.

The problem started here: https://github.com/jtr13/cc21/runs/2197303342

qdap package was not in the DESCRIPTION file even though I tried to resolve it by adding qdap to the DESCRIPTION file. rJava seems to be one of the dependencies required by the packages that qdap depends on.

This is the project that needs qdap
#36

@tracy3057
Copy link
Collaborator

Can you remember which rmd file uses this package?

@jtr13
Copy link
Owner

jtr13 commented Mar 26, 2021

The issue here is that rJava is hard to install on Ubuntu, which is the OS that GitHub Actions is using. That is the reason I didn't include qdap before... sorry I forgot to mention that. I'll try to figure out how to do it. In the meantime, just set the code chunks that use qdap to eval=FALSE and put in a comment in those chunks explaining the issue.

@kennylee15
Copy link
Collaborator Author

Copying my comment from here: 1691bc5

@jtr13 I was trying to figure out what was going with the latest error here.

https://github.com/jtr13/cc21/runs/2198706265?

In particular, this message:

Quitting from lines 145-151 (sentiment_analysis_and_wordcloud.Rmd) 
Error in menu(choices = c("Yes", "No"), title = title) : 
  menu() cannot be used non-interactively
Calls: local ... get_sentiments -> <Anonymous> -> load_dataset -> printer -> menu
Execution halted
Error in Rscript_render(f, render_args, render_meta, add1, add2) : 
  Failed to compile sentiment_analysis_and_wordcloud.Rmd
Calls: <Anonymous> -> render_new_session -> Rscript_render
Execution halted

The problem seems to be line 148. It derives from the fact that this line asks for user input.

See this similar issue on stackoverflow: https://stackoverflow.com/questions/57225210/sentiments-dataset-in-r-throwing-error-with-afinn-lexicon

@kennylee15
Copy link
Collaborator Author

Okay, I tried to replicate it in RStudio. It doesn't run as a rmd file. But I was able to run it as a simple R file.

The problem comes from the fact that in the following code block, this code get_sentiments('nrc') attempts to download a large data file but requires a user confirmation. This requirement for user input probably won't work here.

videogame %>%
  select(id,review) %>%
  unnest_tokens(output = word, input = review) %>%
  inner_join(get_sentiments('nrc')) %>%
  group_by(sentiment) %>%
    count()

I think we should ask the submitter to either leave this part out or load the file in a different way that does not require manual user activity.

@jtr13
Copy link
Owner

jtr13 commented Mar 26, 2021

Exactly. Since the chapter was already merged I figured it was on us to fix it. I just added a note to the chapter and added eval=FALSE to the the two code chunks that use nrc. Often there's a way around these things but they are very explicit that they don't want to allow non-interactive downloads of the lexicons due to licensing issues: EmilHvitfeldt/textdata#19

I was able (finally) to get rJava to work by adding

          sudo apt install \
            default-jre \
            default-jdk 
          sudo R CMD javareconf  

to the GitHub Actions .yaml file.

Now it's failing due to problems with other chapters.

@kennylee15
Copy link
Collaborator Author

Thanks for everything! I dealt with problems with other chapters last night.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants