Hello, I am a master's student from Taiwan. I am following the install requirements of opencap-processing (image 1), but when it comes to executing the "python createAuthenticationEnvFile.py" step, I don't get any response from the Anaconda prompt (image 2). What do you think I should do?
I learned from Microsoft Copilot that Maybe we could manually input the api_key and api_secret of the personal OpenCap account into the Anaconda prompt or create a script and involve the information about the api_key and api_secret. However, I did not find a way to research my api_key and api_secretany and cannot find the " api " term in the personal profile in the OpenCap website.
So I went to this website for help.
Thank you.
Can't run the coding "python createAuthenticationEnvFile.py
- Chang Tzu-Ming
- Posts: 5
- Joined: Wed Aug 14, 2024 12:47 am
Can't run the coding "python createAuthenticationEnvFile.py
- Attachments
-
- Screenshot 2024-08-14 155356.png (104.16 KiB) Viewed 541 times
-
- Screenshot 2024-08-14 113321.png (142.67 KiB) Viewed 541 times
- Matt Petrucci
- Posts: 148
- Joined: Fri Feb 24, 2012 11:49 am
Re: Can't run the coding "python createAuthenticationEnvFile.py
Hello,
Can you check the repository folder for hidden files and see if there is a .env file in there? If it already exists, you wont see any feedback on the command prompt (meaning it ran without errors).
Can you check the repository folder for hidden files and see if there is a .env file in there? If it already exists, you wont see any feedback on the command prompt (meaning it ran without errors).
- Chang Tzu-Ming
- Posts: 5
- Joined: Wed Aug 14, 2024 12:47 am
Re: Can't run the coding "python createAuthenticationEnvFile.py
Thank you for your explanation.
My repository folder for hidden files did not have a .env file, but Anaconda Prompt kept prompting me for an API_TOKEN. Later, I tried to delete the old API_TOKEN in Anaconda Prompt and then ran "python createAuthenticationEnvFile.py" again, and successfully generated a .env file in the repository folder, whose content contained a new API_TOKEN, not the previous one. I think the new API_TOKEN is the correct one, right?
P.S. When I ran "python createAuthenticationEnvFile.py" again, I encountered a problem: Anaconda Prompt prompted me to enter my username, but I could not type it. I tried to replace the "getpass" function in "utilesAuthentication.py" with the "input" function, and then I could type my username successfully, and that's how I got the new API_TOKEN.
My repository folder for hidden files did not have a .env file, but Anaconda Prompt kept prompting me for an API_TOKEN. Later, I tried to delete the old API_TOKEN in Anaconda Prompt and then ran "python createAuthenticationEnvFile.py" again, and successfully generated a .env file in the repository folder, whose content contained a new API_TOKEN, not the previous one. I think the new API_TOKEN is the correct one, right?
P.S. When I ran "python createAuthenticationEnvFile.py" again, I encountered a problem: Anaconda Prompt prompted me to enter my username, but I could not type it. I tried to replace the "getpass" function in "utilesAuthentication.py" with the "input" function, and then I could type my username successfully, and that's how I got the new API_TOKEN.
- Matt Petrucci
- Posts: 148
- Joined: Fri Feb 24, 2012 11:49 am
Re: Can't run the coding "python createAuthenticationEnvFile.py
Great, thank you for the feedback!