OHDSI Home | Forums | Wiki | Github

Getting an error running achilles

We have upgraded to WebAPI and Atlas v2.13.0.
(We also installed a newer RStudio v2023.06.0 Build 421. and loaded new packages rlang, cli, curl and remotes. New OHDSI/Achilles loaded, too.)
Now we are getting:

An error occurred while the ‘DatabaseConnector’ package was updating the RStudio Connections pane:
Error in NULL: host must be a single element of type ‘character’
If necessary, these warnings can be squelched by setting options(rstudio.connectionObserver.errorsSuppressed = TRUE).

but Achilles::achilles() seems to have completed. So does Achilles::optimizeAtlasCache().

Any ideas ?

2 Likes

got the same error

Hi @lyndon and @guybartal. Getting the same error. Screenshots provides below:

Related github issue: https://github.com/OHDSI/Achilles/issues/728

Can you all provide the achilles function call you used, withholding any sensitive info?

Hi @Ajit_Londhe . Running the r script below in Rstudio

image

@solmaz.eradat @guybartal @lyndon What version of Achilles were you using?

Hi @MaximMoinat . The version I’m using is 1.7.2. (screenshot provided)

image

I have the same error.

So, this error isn’t related to executing any particular query, but rather when DatabaseConnector attempts to update the RStudio Connections pane. So, this should be something non-Achilles specific (unless Achilles is doing something to the connection details).

Can you try to connect to your database directly:

 createConnectionDetails()
conn <- DatabaseConnector::connect(connectionDetails);
# check for errors
DatabaseConnector::disconnect(conn)

Hi @Chris_Knoll .

I have tried to create your suggestion and a different error message is been generated.

thanks,
Solmaz

hi, sorry for the confusion, you misunderstood what I meant:

I didn’t mean to change the call to Achilles by passing a connection to connectionDetails (that’s pretty obvious that won’t work when it expects a connection details but you pass in a connection).

What I meant was: as a simple test, just make a connection to your database like you did on line 23 (leave the old Achilles code alone, don’t pass a connection to achilles). What I wanted to see was if you got the error:

An error occurred while the ‘DatabaseConnector’ package was updating the RStudio Connections pane:
Error in NULL: host must be a single element of type ‘character’

I’m testing the hypothesis that this isn’t an Achilles problem, it’s something wrong with your connection details and connecting to your database.

When you make the connection in R Studio, you should see the connection pane refresh showing you a connection to your database, and it should go away when you disconnect. That’s why I only asked you to do this:

createConnectionDetails() # these are your connection details which I don't have
conn <- DatabaseConnector::connect(connectionDetails);
# check for errors, as in: does RStudio update the connection panel and do you see any errors in the console?
DatabaseConnector::disconnect(conn)  # close the connection after you check so you don't have any leaking connections

I found the git issue on this, someone commented:

I rolled back to 1.7.0 using this remotes::install_github("OHDSI/Achilles@v1.7.0") and I was able to run the script without the error occurring.

So, apparently there is something special about 1.7.0 vs 1.7.2, but I looked at the compare between releases, and there were a lot of changes (53 commits across 125 files (3,771 additions and 2,030 deletions). It would be a lot to digest to understand how that could lead to the error in the RStudio Connection pane (can we confirm that’s the actual error you are getting?).

As an aside, the error when connecting to the connection pane isn’t critical to the execution of atlas, I believe if the RStudio connection pane gets an error trying to render, it will just report the error but leave other things in tact, so I believe you can trust your Achilles results even with those errors, but this could be symptomatic of another, deeper, issue.

Also, it would help to know what version of RStudio you are running, and what version of DatabaseConnector is loaded (although the user that reported going back to 1.7.0 allowed it to work calls into question if it is an RStudio/DatabaseConnector issue at all…)

Hi @Chris_Knoll,

Thanks for providing the clarity above. As you suggested above “make a connection to your database like you did on line 23 (leave the old Achilles code alone, don’t pass a connection to achilles).” Screenshot provided below:

The version of DatabaseConnector, Achilles, and Rstudio are provided below:

  • DatabaseConnector = ‘6.2.3’

  • Achilles = ‘1.7.2’

  • RStudio 2023.06.0+421 “Mountain Hydrangea” Release (583b465ecc45e60ee9de085148cd2f9741cc5214, 2023-06-06) for Ubuntu Focal
    Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) rstudio/2023.06.0+421 Chrome/110.0.5481.208 Electron/23.3.0 Safari/537.36

I did see the issue raised in github and the roleback to ‘1.7.0’ seem to resolve the error showing. We are currently trying to get the DB setup for Atlas. Once things are in place we can evaluate if the Achilles results are impacted by the error based on latest versions of the packages and Rstudio.

Many thanks,
Solmaz

Ok, thanks for making that change, and also for providing versions of DatabaseConnector and Achilles.

It’s not clear but did you try to run Achilles again when you created the connection? What’s confusing to me is that I’m not sure if you got that error as a result of running Achilles or if you got that error just by connecting to the database. That’s what I wanted to check (to remove Achilles from the equation): does just simply connecting to the database raise this error? That’s why I said I’d like you to this:

createConnectionDetails()
conn <- DatabaseConnector::connect(connectionDetails);
# check for errors
DatabaseConnector::disconnect(conn)

Note: in the above steps, there is no ‘execute Achilles’ step. I’m just trying to confirm if this error happens from connecting to the database (via DatabaseConnector::connect), or if it only happens during the run of Achilles.

Hi @Chris_Knoll . The error appears during the Achilles run. The connection to the database and disconnect step do not produce any errors.
Thanks,
Solmaz

Hi Solmaz,
I got the same error running achilles. I also tried 1.7.0 using this `remotes::install_github(“OHDSI/Achilles@v1.7.0”), but I got another error.

‘Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec, :
line 62 did not have 6 elements’

Hi Siyan. Thanks for the message. I’m keeping on the forum and the github issue on the progress on this.

I ran a number of tests today in my environment and was unable to reproduce this error against postgres, sqlite or duckdb using the 1.7.2 version of Achilles. Could you try running and adding the following R co
de before running Achilles?

options(connectionObserver = NULL)

This will disable the connections pane to determine if the error is only related to the RStudio pane or something specific about the way 1.7.2 is handling database connections.

1 Like

Hi @Frank . I added the line of code you suggested before running Achilles and the error message does not appear.

Thank you,
Solmaz

t