0

I was using Pycharm as my editor to run the scripts since i need to add a task scheduler i had to test the code on the command prompt. Firstly this is the structure of my project. enter image description here

When i try to run the following line

C:\Users\My_name\AppData\Local\Programs\Python\Python36-32\python.exe "C:\Users\My_name\PycharmProjects\FYP_CB006302\generateSummary.py"

I get this error, enter image description here

From the knowledge i have i think it is because it doesn't recognize the path.

But when i change the directory to my project folder then give the path to python.exe and type generateSummary.py it works which was done as shown here.

However i highly doubt that this method can be used to task a schedule in Windows. Therefore, any ideas that would to run as shown in the beginning will be helpful.

rando
  • 67
  • 6

1 Answers1

1

The problem here is that when you use that line to run a particular script the folder which is causing the error is out of scope.

  C:\Users\My_name\AppData\Local\Programs\Python\Python36-32\python.exe "C:\Users\My_name\PycharmProjects\FYP_CB006302\generateSummary.py"

In this case pickle_saves folder is out of scope. You can avoid this by giving a absolute path to that file in line 173. Where the absolute path is something like C:\user\documents\projects\pickle_saves\all_words

Steve harvey
  • 71
  • 1
  • 10