informatics-isi-edu / deriva-qt

Graphical User Interface tools for DERIVA using PyQt
GNU General Public License v3.0
0 stars 1 forks source link

deriva-auth agent crashing on windows #8

Closed gedigerivijay closed 6 years ago

gedigerivijay commented 6 years ago

Hi,

I am using deriva-auth agent version 0.4.2 for windows for Python 2.7. When I open the DERIVA-Auth.exe file, the app is crashing and throwing the error.

image

This was working earlier before I started switching between Python 2.7 and Python 3.6. Is this a known issue, or got to do with Python version? Kindly help. Thanks

mikedarcy commented 6 years ago

If you are using the bundled application from the Github release page, the Python interpreter is included in the application bundle, and is version 3.5, so your switching versions of your installed system python should not make a difference here. In order to help troubleshoot, pleas copy the entire stack text from the error message box and paste it back here.

gedigerivijay commented 6 years ago

I just found out the issue is with auth-agent-config.json file in .deriva folder. Credentials in json file was messed up, which is why it said JSONDecodeError. I had to delete the file and restart deriva-auth. Now, its working fine. Thanks for the quick response.

mikedarcy commented 6 years ago

OK, but how did the file get messed up? Normal operation should not corrupt the file, and if it does, we may need to add some additional code to guard against that. Otherwise, if it got messed up via external editing, that's OK, but please close the issue in that case. Thanks.

gedigerivijay commented 6 years ago

I don't think I edited the file either except I made a copy of the file auth-agent-config.json and stored in credentials.json. I had to do this because, in Python, when I try to connect to a host with credential = get_credential(hostname) from https://github.com/informatics-isi-edu/deriva-py/blob/master/docs/derivapy-datapath-example-1.ipynb, I got an error saying "credential.json" file not found. Can you please tell if we need to modify the file name? I will close this issue soon after that. Thanks.

mikedarcy commented 6 years ago

The files auth-agent-config.json and credential.json serve two different purposes, so copying one to the other would not be correct in any circumstance. The auth-agent-config.json stores the list of configured hosts that the auth-agent GUI shows in it's drop-down list. The credential.json file stores the bearer tokens for hosts that have been successfully logged into.

The credential.json file does not get created until you login successfully to at least one host with the auth-agent application, so my guess would be that you tried to run the Python notebook example without running the auth-agent first.

gedigerivijay commented 6 years ago

Thank you. That makes sense. Closing the issue.