0

I've been following a tutorial Learn Code by Gaming on youtube. It's been great, on tutorial 3 I noticed the author has tidied his scrips into folders. I've tried to emulate this but I'm now getting this error and nothing runs.

(electron) Sending uncompressed crash reports is deprecated and will be removed in a future version of Electron. 
Set { compress: true } to opt-in to the new behavior. 
Crash reports will be uploaded gzipped, which most crash reporting servers support.

Everything was working correctly when I was running it out of the main Python39 folder.

enter image description here

I've tried to tidy things up and it now looks like the below with the two images I need and the .py file I've been running in each.

enter image description here

enter image description here

I've seen people lots of time run their code directly in the terminal by just typing the name of a .py file that's in the folder their terminal is currently pointing at.

Googling the error is oddly not bringing anything useful (to me) up. All I wanted to do was organise my scripts into folders and still be able to run the scrips, I'm guessing I'm missing something fairly basic!

I'm not sure if it's possible but I'd love to be able to run any of the .py files in the Python39 folder directly from the terminal rather than having to change directory every time.

  • You need to add Python's location to your system PATH variable, and the various support modules to PYTHONPATH. In the future, when you install something, use the recommended installation application, such as `pip3 install`. That will update the path variables for you. – Prune Feb 10 '21 at 22:53
  • Hi Prune, it was a pip install for opencv I guess that's why I can use the open cv functions? I've added \programs\python\python39\scrips to the environment variable path. Does that mean anything in that scrips folder I should be able to run via the terminal? I wasn't sure what it was doing. –  Feb 10 '21 at 22:57
  • @Prune yup that did it, thank you. I just missed what the environment variable was doing. –  Feb 10 '21 at 23:01

1 Answers1

0

Instead of typing just the name of your .py file you enter the full path you will probably need to put it between quotation marks if there are spaces in your full path.

It should look like this: "C:\appdata\local\programs\ python\learn by gaming\001 intro\main.py"

user14518362
  • 320
  • 4
  • 11