0

I have imported Python Project in Eclipse. When i run the script on mac machine i am getting error as below:

[Errno 2] No such file or directory: '/Users/noimac-mini4/Documents/workspace/MobileAutomationPy\\..\\..\\..\\..\\'

what could be possible cause of error here?

Same project imported in windows machine and it is working fine but not in mac

4
  • Could you please provide the code here? Commented Jun 17, 2015 at 9:33
  • Your probably trying some relative path which does not exists, if yo'll provide the code and the full traceback it will easier to debug. Commented Jun 17, 2015 at 9:34
  • This is big project which i imported in eclipse BUT same code imported in windows machine working correctly. Commented Jun 17, 2015 at 9:35
  • 2
    @sandy Windows and Mac paths are different if you didn't pay attention and made a propper use with os.path functions then you can have mismatch Commented Jun 17, 2015 at 9:37

1 Answer 1

2

What i see here is a lot of backslashes (\) in your path which are used on Windows platforms, that is why it works when imported on Windows machine. My guess would be that you have this path stored inside a string or something.

Better approach would be to use os.path and os.sep when dealing with platform independent path's.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.