-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting API key from code still uses the API key in config.ini #231
Comments
That's correct, module Why don't you just change the keys in the configuration file? |
Because it's a shared computer and the documentation says I can change them from code |
You probably refer to https://pybliometrics.readthedocs.io/en/stable/configuration.html#runtime, right? It used to be possible to assign keys at runtime, but since I implemented throttling it was too difficult to maintain this feature (especially while maintaining a smooth compilation on rtfd.io). But what should work is to change the location of the configuration at runtime (but before importing pybliometrics) as in https://pybliometrics.readthedocs.io/en/stable/configuration.html#custom-location |
Yes
Let's change the docs if that is no longer the case :)
ok, I'll try that. For the moment I achieved what I had to do.
Why, if I want to keep the cache separate? |
For now I the documentation make clear that one cannot set keys at runtime. Maybe in future this will be possible. |
Seems like duplicate (or related to) #161 |
I'm setting my API key from code, by writing
both before
and after it.
But pybliometrics is still using the API key from
config.ini
.I know because I get a "Scopus401Error: Invalid API Key" error, and I have modified
pybliometrics/scopus/utils/get_content.py
by addingafter
in the
get_content
function, and it is printing the API key in the config file.The text was updated successfully, but these errors were encountered: