Skip to content
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

Error getting login token #744

Open
InfinitelyCurious opened this issue Nov 17, 2021 · 8 comments
Open

Error getting login token #744

InfinitelyCurious opened this issue Nov 17, 2021 · 8 comments
Labels
authentication Issues relating to authentication of marvin

Comments

@InfinitelyCurious
Copy link

I am in the process of setting up marvin to use in a terminal, but am stuck at getting an API token. I have set up my .netrc, and it is recognizing it, but then throws the error:

in
----> 1 config.login()

~/anaconda3/lib/python3.7/site-packages/marvin/init.py in login(self, refresh)
753 resp = Interaction(url, params=data, auth='netrc')
754 except Exception as e:
--> 755 raise MarvinError('Error getting login token. {0}'.format(e))
756 else:
757 self.token = resp.results['access_token']

MarvinError: Error getting login token. Requests Http Status Error: 500 Server Error: INTERNAL SERVER ERROR for url: https://sas.sdss.org/marvin/api/general/login/
None.

I am running this on MacOS Catalina in python 3.7 (which has come with its own problems). Not sure how to move on from here.

@havok2063
Copy link
Collaborator

@InfinitelyCurious I can't reproduce this. Can you provide the steps you do to produce the traceback? What version of marvin are using? What MaNGA data release are you trying to access? And what does config.access output?

@havok2063 havok2063 added the authentication Issues relating to authentication of marvin label Nov 19, 2021
@InfinitelyCurious
Copy link
Author

InfinitelyCurious commented Nov 30, 2021 via email

@havok2063
Copy link
Collaborator

Hi @InfinitelyCurious hmm it sounds like you had or are having some base installation issues. We don't recommended trying to install marvin in your root system, or use the system Python that comes with the laptop. For a clean conda installation, you can do the following:

conda create -n marvin python=3.8 ipython

This creates a new conda environment named "marvin", and installs python 3.8 and ipython into it. You can change the python version here to 3.9 or whichever one you use. Next you need to activate the conda environment and install marvin into it.

conda activate marvin
pip install sdss-marvin

This will create a clean, isolated, install of marvin from the rest of your system. Then you should be able to import and use marvin within that environment. For marvin access and authentication, you can look at https://sdss-marvin.readthedocs.io/en/latest/installation.html#access-and-authentication for setting up your netrc file and getting a marvin login token. If you're still seeing that 500 internal server error after that, there could be something wrong with the server. It's been down intermittently while we perform some maintenance and update things ahead of DR17.

@InfinitelyCurious
Copy link
Author

InfinitelyCurious commented Dec 3, 2021 via email

@havok2063
Copy link
Collaborator

@InfinitelyCurious Everything should be back up by tomorrow. I'll still be doing some maintenance on the database but the website and API access should be back up. This should also resolve the login issues you are seeing. You may need to refresh your authentication token.

@havok2063
Copy link
Collaborator

@InfinitelyCurious Everything should be back up now. Is this still an issue?

@InfinitelyCurious
Copy link
Author

InfinitelyCurious commented Dec 8, 2021 via email

@havok2063
Copy link
Collaborator

Can you provide some example code to see if I can reproduce the problem? Have you updated to the latest version of marvin, 2.7.1 or 2.7.2? Do you have an old token stored in your custom configuration? Have you tried forcing a fresh token to be generated? If things still fail after that, you can always switch to the public mode of marvin. DR17 is out, so all MaNGA data is now publicly available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
authentication Issues relating to authentication of marvin
Projects
None yet
Development

No branches or pull requests

2 participants