Python API - Connection with _netrc failing? | mohara | 2023-08-22 09:29 |
Status: Active | ||
Hi Connor: When you're providing the credential in the netrc file, you don't need to also pass the api_key parameter, and in your example it is not set to anything. Try it with the call to APIWrapper reading:
and see if that picks up the credential. In addition, from the response snippet, it looks like your apikey in netrc still includes the "apikey|" prefix, which is [no longer used for newer API keys|(https://www.labkey.org/Documentation/wiki-page.view?name=releasenotes233#dev). Keys generated before this change with the prefix may still work, but it might be worth generating a new one on your server and using that. The key-generation UI will show you an R usage example which will show the key quoted as it should be used. Unless you are on an older version of LabKey Server, it will not include the prefix. We can also move this topic to your Premium Support Portal if you need more specific assistance with your script and/or placement of the netrc file. Hope that helps, --Molly |
||