← Back to team overview

sikuli-driver team mailing list archive

[Question #658485]: NameError: name 'robot' is not defined Error on running my script

 

New question #658485 on Sikuli:
https://answers.launchpad.net/sikuli/+question/658485

Hi,


I get the following error when i execute my Sikuli script, Seen this  only for few of my scripts , Not sure why.
I used the same robo class syntax used in the script which executed without below error 


 <code used>
from sikuli import*
runScript("""
robot
*** Variables ***
${USERNAME}               demo
${PASSWORD}               mode
${TESTSITE}               http://test.sikuli.de
*** Settings ***
Library           ./inline/LoginLibrary
Test Setup        launch application    
Test Teardown     stop application
*** Test Cases ***
TC-18 :Validate library material transluency shade are disabled for non restoration
    Create patient 
 
""")

class LoginLibrary(object):
  def launch_application(self):
     #write code to launch dc#
    <CODE>
        
  def stop_application(self):
    #write code to stop dc#
    popup("stop_dc")
    
    
    
  def Create_patient(self):
    #Code to create patient#
      
    <CODE>


<ERROR I GOT>

[error] JythonSupport: exec: returns: Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\sappikonda\AppData\Roaming\Sikulix\Lib\robot\__init__.py", line 40, in <module>
from robot.rebot import rebot, rebot_cli
File "C:\Users\sappikonda\AppData\Roaming\Sikulix\Lib\robot\rebot.py", line 40, in <module>
from robot.conf import RebotSettings
File "C:\Users\sappikonda\AppData\Roaming\Sikulix\Lib\robot\conf\__init__.py", line 26, in <module>
from .settings import RobotSettings, RebotSettings
File "C:\Users\sappikonda\AppData\Roaming\Sikulix\Lib\robot\conf\settings.py", line 21, in <module>
from robot.output import LOGGER, loggerhelper
File "C:\Users\sappikonda\AppData\Roaming\Sikulix\Lib\robot\output\__init__.py", line 21, in <module>
from .output import Output
File "C:\Users\sappikonda\AppData\Roaming\Sikulix\Lib\robot\output\output.py", line 15, in <module>
from . import pyloggingconf
File "C:\Users\sappikonda\AppData\Roaming

\Sikulix\Lib\robot\output\pyloggingconf.py", line 18, in <module>
from robot import utils
File "C:\Users\sappikonda\AppData\Roaming\Sikulix\Lib\robot\utils\__init__.py", line 62, in <module>
from .robottime import (elapsed_time_to_string, format_time, get_elapsed_time,
File "C:\Users\sappikonda\AppData\Roaming\Sikulix\Lib\robot\utils\robottime.py", line 15, in <module>
import datetime
File "C:\Sikuli\sikulix.jar\Lib\sikuli\SikuliImporter.py", line 45, in load_module
File "C:\Sikuli\sikulix.jar\Lib\sikuli\SikuliImporter.py", line 27, in _load_module
ImportError: datetime.sikuli has no datetime.py

[error] JythonSupport: exec: returns: Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'robot' is not defined

All theese days , all my sikuli scripts run great . not sure why this error is caused.

Please Help.

Thanks in advance

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.