ENOENT

Asked by janani pavithra

IO Error: (2, 'ENOENT', 'c:\\users\\rd\\desktop\\My Functions\\funcCreateOutFolder.sikuli\\funcCreateOutFolder.py')

what does this error mean...
i have a set of functions stored in "my functions" directory and i tried to use those stored functions in my script with

setBundlePath("c:\\users\\rd\\desktop\\My Images")
from time import strftime
exec open("c:\\users\\tz\\desktop\\My Functions\\funcCreateOutFolder.sikuli\\funcCreateOutFolder.py").read()
exec open("c:\\users\\tz\\desktop\\My Functions\\funcLaunchFile.sikuli\\funcLaunchFile.py").read()
exec open("c:\\users\\tz\\desktop\\My Functions\\funcSaveAsFile.sikuli\\funcSaveAsFile.py").read()
exec open("c:\\users\\tz\\desktop\\My Functions\\funcOpenPrinterGUI.sikuli\\funcOpenPrinterGUI.py").read()
exec open("c:\\users\\tz\\desktop\\My Functions\\funcExecuteTestcase.sikuli\\funcExecuteTestcase.py").read()
exec open("c:\\users\\tz\\desktop\\My Functions\\funcDoPrint.sikuli\\funcDoPrint.py").read()

then my script continues..

can you correct the mistake..for your information all my functions need not return anything..

Thanks for your continuous help..

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

The error message shows a path
c:\\users\\rd

In your script the file references show
c:\\users\\tz

How comes the difference? I cannot see any reference to the path in the error message in your script (except for the images) ?

e.g. funcCreateOutFolder.py:
- is the content wrapped in a < def funcCreateOutFolder(): > to be called in your script later on?

Why do you not use execfile() instead of exec open().read()? only for raedability, has nothing to do with the error.

are there any cross references in your functions, that have not been changed to c:\\users\\tz?

Revision history for this message
janani pavithra (janani-pavithra) said :
#2

Even when I use execfile("path to an image file"),I am getting the following error:

Traceback (most recent call last):
  File "C:\Users\rd\AppData\Local\Temp\sikuli-tmp1432326263455158776.py", line 4, in <module>
    execfile("c:\\users\\rd\\desktop\\My Functions\\funcCreateOutFolder.sikuli\\funcCreateOutFolder.py")
IOError: (2, 'File not found - c:\\users\\rd\\desktop\\My Functions\\funcCreateOutFolder.sikuli\\funcCreateOutFolder.py (The system cannot find the file specified)')

In my script:

setBundlePath("c:\\users\\rd\\desktop\\My Images")
from time import strftime
execfile("c:\\users\\rd\\desktop\\My Functions\\funcCreateOutFolder.sikuli\\funcCreateOutFolder.py")
execfile("c:\\users\\rd\\desktop\\My Functions\\funcLaunchFile.sikuli\\funcLaunchFile.py")
execfile("c:\\users\\rd\\desktop\\My Functions\\funcSaveAsFile.sikuli\\funcSaveAsFile.py")
execfile ("c:\\users\\rd\\desktop\\My Functions\\funcOpenPrinterGUI.sikuli\\funcOpenPrinterGUI.py")
execfile("c:\\users\\rd\\desktop\\My Functions\\funcExecuteTestcase.sikuli\\funcExecuteTestcase.py")
execfile("c:\\users\\rd\\desktop\\My Functions\\funcDoPrint.sikuli\\funcDoPrint.py")

Revision history for this message
RaiMan (raimund-hocke) said :
#3

its doubled. please don't do. stay in one thread.

set this to solved, pls.

Can you help with this problem?

Provide an answer of your own, or ask janani pavithra for more information if necessary.

To post a message you must log in.