Fix Failed Module Import in Sikuli Scripts

Sikuli IDE throws below error while importing the modules essentially with import subprocess Code: [code language=”csharp”] import sys import time import subprocess import os [/code] Error Message: [info] Sikuli vision engine loaded. [info] Windows utilities loaded. [info] VDictProxy loaded. [error] Stopped [error] An error occurs at line 3 [error] Error message: Traceback (most recent call last): File “C:\Users\GOVARD~1\AppData\Local\Temp\sikuli-tmp6393242728040316401.py”, line 3, in import subprocess  File “C:\Program Files\Sikuli X\sikuli-script.jar\Lib\subprocess.py”, line 642, in File “C:\Program Files\Sikuli X\sikuli-script.jar\Lib\subprocess.py”, line 640, in _setup_platform File “C:\Program Files\Sikuli X\sikuli-script.jar\Lib\warnings.py”, line 56, in warn File “C:\Program Files\Sikuli X\sikuli-script.jar\Lib\warnings.py”, line 56, in warn IndexError: index out of range: 0 […]

Read more

Web Scraping with Perl scripting

Similar to various powerful modules, Perl comes with various modules for web scraping, that is extracting required information from web HTML pages. Below is a sample script that I authored to extract the movies information from www.justtollywood.com web site pages. [code language=”perl”] #! perl #=============================================================================== # Objective: # ———- # # Perl script to demo the web scraping modules to extract intended information # from web pages. # # For this example, I used www.justtollywood.com pages. # # $Header: $ #=============================================================================== # Include Modules #=============================================================================== use strict; use warnings; use Pod::Usage; use File::Basename; use HTML::TableExtract; use HTML::TreeBuilder 3; use Getopt::Long […]

Read more

Perl script: HtmlAsText.pl to convert HTML content into Text File format

This program is to illustrate how tools like HtmlAsText usually work. [code language=”perl”] #! perl #=============================================================================== # Objective: # ———- # # Script to convert HTML File content into Text File # # # $Header: $ #=============================================================================== # Include Modules #=============================================================================== use strict; use warnings; use Pod::Usage; use LWP::Simple; use File::Basename; use HTML::Table; use Alvis::HTML; use HTML::TableExtract qw(tree); use Getopt::Long qw(:config no_ignore_case bundling); #=============================================================================== # Global Variables Declaration #=============================================================================== use vars qw($DEBUG $SRC_FLDR $DEST_FLDR $HTML_TBL_OBJ $ALVIS_HTML_OBJ); #=============================================================================== # Prototypes Section #=============================================================================== sub DoAction; sub My_Readdir; sub InitGlobals; sub ProcessArgs; sub Info {my ($mesg) = @_; print STDOUT "INFO: $mesg\n";} sub […]

Read more