ProjectInitializationAutomation
ProjectInitializationAutomation copied to clipboard
Traceback (most recent call last): File "v:/MAIN cause PY/ProjectInitializationAutomation/windows_OS/remote.py", line 5, in <module> foldername = str(sys.argv[1]) IndexError: list index out of range
this is the problem
I made it a lot better, actually. Just trying to contact Kalle so he can merge it https://github.com/Red-CS/ProjectInitializationAutomation/tree/winOS_gen
this is the problem
But the problem you're facing is how you run it. If you manually hit run, sys.argv will give that error. Doing it from cmd with additional parameter gives length of 2
length
I can't understand what you are clearly saying....
The sys module gets any additional arguments passed. If you run
create thisName
- sys.argv[0] --> remote.py
- sys.argv[1] --> thisName
This works if you open a terminal and enter the second line above, which is how the project is meant to work.
If you are in an editor, let's say VS Code, by clicking the green "run" icon, all you're really doing is entering
remote.py
In which case
sys.argv[0] --> remote.py And len(sys.argv) --> 1
2 fixes:
- Write it from the command line
- Clone the version I wrote. Doesn't bring you errors and you can do so much more.
hey in your file it is not clear what to do can you explain me in a better way I don't know what to do with your file
Did you read the Readme file? I thought I made it very clear, but let me reiterate:
- Clone the repository (or you could literally just copy paste code)
- Set User Variables "PWFA-Path" and "PWFA-Token" to the path of the Windows folder and the GitHub token, respectively.
- Type "create" in the terminal. If you see output, them it worked
I have created a same script as this to work on every machine DO NOT WORRY THIS SCRIPT WORKS ON EVERY MACHINE Link to the project: https://github.com/String-error-404/GIT-and-GTITHUB_automation
if you like the project give a star to the repo and follow me on github
Just browsing through the code, it looks like it works. It's just that the original purpose of Kalle's project was to run the program with a simple command from the terminal, instead of either manually finding the script in the explorer, opening code, and running, or going to terminal, cd into folder of that script and running python git.py
Did you read the Readme file? I thought I made it very clear, but let me reiterate:
- Clone the repository (or you could literally just copy paste code)
- Set User Variables "PWFA-Path" and "PWFA-Token" to the path of the Windows folder and the GitHub token, respectively.
- Type "create" in the terminal. If you see output, them it worked
i try it but this doesn't work for me
Just browsing through the code, it looks like it works. It's just that the original purpose of Kalle's project was to run the program with a simple command from the terminal, instead of either manually finding the script in the explorer, opening code, and running, or going to terminal, cd into folder of that script and running
python git.py
Yeah what you are saying is correct but i made it more simpler for easy to understand for other's So thanks for replies