Skip to content

Update app_server.R#8

Open
DrMattG wants to merge 1 commit intoIQWiG:mainfrom
DrMattG:patch-1
Open

Update app_server.R#8
DrMattG wants to merge 1 commit intoIQWiG:mainfrom
DrMattG:patch-1

Conversation

@DrMattG
Copy link

@DrMattG DrMattG commented Jun 18, 2024

Fixing the error on start "Error in switch: EXPR must be a length 1 vector" where the switch is expecting either a ris or txt file but as none have been uploaded yet it gives an error.

Fixing the error on start "Error in switch: EXPR must be a length 1 vector" where the switch is expecting either a ris or txt file but as none have been uploaded yet it gives an error.

rawdata <- reactive({
req(input$upload)
req(input$upload) # Ensure the file is uploaded
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for checking out searchbuildR! I am wondering why this error occurs for you. Should this not be handled by line 43 req() without any further checks necessary?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would make sense to me! I am not sure but it seems to be because of the switch() which is looking for either txt or ris file. Shiny can be a bit weird about how it runs code (not always in what we think is "order")

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

Successfully merging this pull request may close these issues.

2 participants