Why does my script crash or skip commands in the terminal?
Asked by
_27_blank_spaces
I'm experiencing an issue where my script crashes or skips the first input command every time I run it in Powershell or the terminal. Instead of taking my input, it fills that space with a file path related to my virtual environment, which looks something like this: 'c:[personal file].venvScriptsactivate'. This only occurs in a fresh terminal session, but if I run the script again, it works fine. I also want to mention that this started happening after I removed restrictions on running scripts, as my computer was being picky with JSON files.
Answers
Without seeing the actual code, it's tough to diagnose your issue. Can you share how you're running the script and any relevant code snippets? It sounds like something is triggering that file path instead of letting you input your command.
Reply to this answer
Just like fixing a car noise, we really need more details to assist you effectively. For instance, could you show a quick example of your script? And make sure to format your code properly so we can easily read it!
_27_blank_spaces: Got it! Iโll try to share a code snippet and see if that helps clarify things better.
Reply to this answer
Add your answer
Answers are reviewed before publication.
WEEKDAY MATINEE: I get what you mean! This seems to be a broader issue if it happens across all your scripts. It might help to check if your environment variables or something in your terminal configuration has changed.