Forum Discussion

tc_2018's avatar
tc_2018
Contributor
6 years ago

os.chdir(myPath) is not working.

Hi,

I have the code below and it works fine with the IDLE; however, it is not working with T.C.

 

import os

myPath = 'O:\\myDir' #this is my mapped network drive

os.chdir(myPath)

 

Can someone please shed a light!

7 Replies

    • tc_2018's avatar
      tc_2018
      Contributor

      I got error message:

       

      Python runtime error.

      FileNotFoundError

      [WinError3] The system cannot find the specific path specified: 'O:\\\\'

      • Marsha_R's avatar
        Marsha_R
        Champion Level 3

        If you hard code the path in the os.chdir line, does it work?  That will tell you if it is a syntax problem with the second line or a permissions problem and TestComplete can't get to that directory.