[1.0] some_name.sikuli hides a Python module some_name at import and gives weird errors
Bug #1210474 reported by
RaiMan
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SikuliX |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
--- problem ----
a Sikuli script xml.sikuli found on sys.path "hides" the Python module
users should obey the rule:
A Sikuli script, that can be found on sys.path at runtime, should not be named like a Python module, that is to be imported in the same script run.
-------
with a simple script like
from xml.dom import minidom
I get the following error
File "/Users/
from xml.dom import minidom
ImportError: No module named dom !!WHILE IMPORTING!!
I did not find any method, to get minidom imported to use the minidom.parse... options.
Changed in sikuli: | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → RaiMan (raimund-hocke) |
milestone: | none → 1.1.0 |
Changed in sikuli: | |
status: | In Progress → Won't Fix |
importance: | Medium → Undecided |
assignee: | RaiMan (raimund-hocke) → nobody |
milestone: | 1.1.0 → none |
description: | updated |
summary: |
- [1.0] Problems importing xml.dom.minidom in script running mode + [1.0] some_name.sikuli hides a Python module some_name at import and + gives weird errors |
To post a comment you must log in.
I again checked the problem with any combination of Sikuli and Jython 2.5.3 and 2.5.4:
I do not get the error anymore.
The only situation:
if a xml.sikuli can be found in sys.path (might be in the same directory or even the current script), the import fails.
Sikuli's import support prioritizes .sikuli scripts when searching along the sys.path, so a Sikuli script should not be named as a Python module, when this Python module should be imported.
Nevertheless I leave this a s bug, to check wether this can be avoided somehow.