_netrc marcia hon  2018-01-30 06:33
Status: Closed
 
Hello,

I have configured _netrc.txt as specified in the documentation.

I get the error:

Error in processResponse(mydata, header, handle) :
  HTTP request was unsuccessful. Status code = 401, Error message = NA 401

My HOME variable is set to: C:\Users\marcia_hon\Documents

Also, my _netrc.txt file is set to:

machine labkey.camh.ca
login email@camh.ca
password password_for_emal@camh.ca

My script is:

library(Rlabkey)
query <- paste('SELECT AnimalId FROM AnimalInfo WHERE AnimalId = 8')
data <- labkey.executeSql(baseUrl="url",
                           folderPath="folder_path",
                           schemaName="lists",
                           sql = query,
                           showHidden = TRUE)

I appreciate all your help.

Marcia
 
 
marcia hon responded:  2018-01-30 07:34
I solved it by using Linux instead of Windows.
 
Jon (LabKey DevOps) responded:  2018-01-30 12:15
Hi Marcia,

Glad you were able to use Linux instead of Windows to resolve your issue.

The file should be just _netrc rather than "_netrc.txt" per our documentation if you are using it on a Windows environment:

https://www.labkey.org/Documentation/wiki-page.view?name=netrc

Regards,

Jon
 
marcia hon responded:  2018-02-01 06:55
Ahh... thanks!