Can't run the coding "python createAuthenticationEnvFile.py

New project for OpenCap, which is a new software package to estimate 3D human movement dynamics from smartphone videos. OpenCap strongly relies on OpenSim.
POST REPLY
User avatar
Chang Tzu-Ming
Posts: 5
Joined: Wed Aug 14, 2024 12:47 am

Can't run the coding "python createAuthenticationEnvFile.py

Post by Chang Tzu-Ming » Wed Aug 14, 2024 1:05 am

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.
Attachments
Screenshot 2024-08-14 155356.png
Screenshot 2024-08-14 155356.png (104.16 KiB) Viewed 541 times
Screenshot 2024-08-14 113321.png
Screenshot 2024-08-14 113321.png (142.67 KiB) Viewed 541 times

User avatar
Matt Petrucci
Posts: 148
Joined: Fri Feb 24, 2012 11:49 am

Re: Can't run the coding "python createAuthenticationEnvFile.py

Post by Matt Petrucci » Thu Aug 15, 2024 2:16 pm

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).

User avatar
Chang Tzu-Ming
Posts: 5
Joined: Wed Aug 14, 2024 12:47 am

Re: Can't run the coding "python createAuthenticationEnvFile.py

Post by Chang Tzu-Ming » Fri Aug 16, 2024 7:44 am

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.

User avatar
Matt Petrucci
Posts: 148
Joined: Fri Feb 24, 2012 11:49 am

Re: Can't run the coding "python createAuthenticationEnvFile.py

Post by Matt Petrucci » Tue Aug 20, 2024 11:50 am

Great, thank you for the feedback!

POST REPLY