Closed poldrack closed 1 year ago
Note: The tests require a MongoDB instance to be running locally...
Very strange. The only idea I have is that on Mac the API key is not loaded properly.
Could you please verify that
from pybliometrics.scopus.utils.startup import KEYS
print(KEYS)
is not empty?
thanks - KEYS is not empty on the Mac:
In [1]: from pybliometrics.scopus.utils.startup import KEYS
...: print(KEYS)
['65...04']
and contents match those on my linux box.
I also tried creating a new API key and testing that - same problem.
Update: I tried running the same code within a docker container on both the Mac and the linux system. I get the same Scopus401 errors in the docker container on each of those machines using the key that still works properly within a shell on the linux system.
OK, figured it out: The apparent success on my linux box was due to the fact that it was using the cached results. when I moved the original .pybliometrics directory then it failed as the other machines did. Not sure what's up with my scopus key, but at least this doesn't seem to be a pybliometrics problem so I'm closing this.
Glad you found the cause!
I should have asked earlier whether the conditions to access Scopus were the same on both machines.
This documentation might help with your software: https://pybliometrics.readthedocs.io/en/stable/access.html
Thanks - I hadn't realized that the results of previous searches were cached in the .pybliometrics folder, might be worth adding a note about that to the docs.
On Sun, Apr 2, 2023 at 2:41 AM Michael E. Rose @.***> wrote:
Glad you found the cause!
I should have asked earlier whether the conditions to access Scopus were the same on both machines.
This documentation might help with your software: https://pybliometrics.readthedocs.io/en/stable/access.html
— Reply to this email directly, view it on GitHub https://github.com/pybliometrics-dev/pybliometrics/issues/283#issuecomment-1493280650, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGUVEFBYB3P42X5W2PJE2LW7FCTBANCNFSM6AAAAAAWPXPSKQ . You are receiving this because you modified the open/close state.Message ID: @.***>
-- Russell A. Poldrack Albert Ray Lang Professor of Psychology Associate Director, Stanford Data Science Director, SDS Center for Open and Reproducible Science Building 420 Stanford University Stanford, CA 94305
@. @.> http://www.poldracklab.org/
might be worth adding a note about that to the docs
Where would you expect that? Because it's described at the end of each class, in the configuration page as well as a special section in Tips .
thanks, that seems fine, I just need to read better :-)
On Sun, Apr 2, 2023 at 8:10 AM Michael E. Rose @.***> wrote:
might be worth adding a note about that to the docs
Where would you expect that? Because it's described at the end of each class, in the configuration page https://pybliometrics.readthedocs.io/en/stable/configuration.html as well as a special section in Tips https://pybliometrics.readthedocs.io/en/stable/tips.html#database-updates .
— Reply to this email directly, view it on GitHub https://github.com/pybliometrics-dev/pybliometrics/issues/283#issuecomment-1493368512, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGUVEF6LY7IOVE6PAFT6ULW7GJG5ANCNFSM6AAAAAAWPXPSKQ . You are receiving this because you modified the open/close state.Message ID: @.***>
-- Russell A. Poldrack Albert Ray Lang Professor of Psychology Associate Director, Stanford Data Science Director, SDS Center for Open and Reproducible Science Building 420 Stanford University Stanford, CA 94305
@. @.> http://www.poldracklab.org/
pybliometrics version: 3.4.0 (on both systems)
Code to reproduce the bug:
Expected behavior:
When the same tests are run on my mac (MacOS 13.2.1), using the same version of pybliometrics and the same API key (confirmed same contents of ~/.pybliometrics/config.ini:Authentication:APIKey) on the same home network (with no VPN or proxy set on either AFAIK, and same external IP address according to https://whatismyipaddress.com/) , I get the following: