Closed wshclth closed 2 years ago
Hi there,
We recently merged https://github.com/Nasdaq/data-link-python/pull/11 which tries much harder to strip whitespace and find the api key. Apparently there's still an edge-case that wasn't covered in one of the introduced tests?
I should note that a release has yet to be sent up to pypi.org. A release is forthcoming.
1.0.1 has been pushed to pypi. If you can re-try your use-case and let us know if your issue has been resolved.
I've opened issue #14 to collect any further issues users have, as it is recognized cleaning whitespace isn't solved for env-var use-cases.
Good Morning, The API key stripping related to reading from a file is fixed now.
The api key loaded during initialization causes it to include a new line character. As a result the new line is passed onto the HTTP request which results in an error during any HTTP request.
This problem is solved by stripping the key during an initial loading of white space present before or after the API text. Strip is safe to use here because it will never strip data inside the key, only leading and trailing white space will be removed.