IDE: Importing doesn't work when imported file changes: Requires Sikuli restart
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SikuliX |
Fix Released
|
High
|
RaiMan |
Bug Description
*** possible workaround -------
use
import functions
reload(functions)
... but this only works if the module is fully reloadable (means: does not contain code, that should only run once)
-------
Sikuli cannot import changes from another sikuli project to main sikuli project without restarting Sikuli.
Let say we have main.sikuli and some functions on separate sikuli project (let say functions.sikuli). Importing works fine but doesn't work when doing changes on the imported Functions.sikuli. Both projects are open simultaneously and I do quite often changes to functions when developing because on test automation chains can be very long and reusable code is needed.
This is very annoying to shut down Sikuli always when changing other project and then restarting it. It causes sometimes really strange errors if forgot to restart...
Basically this happens always for me. Below is import part of the main.sikuli.
# coding: utf-8
from sikuli import *
import os
import Functions
OS: Windows 7 SP1 64 bit
Sikuli v1.0.0 32bit on 64bit platform because Java is forced 32bit
description: | updated |
description: | updated |
tags: | added: idererun |
description: | updated |
Changed in sikuli: | |
status: | Confirmed → In Progress |
Changed in sikuli: | |
milestone: | 1.1.0 → 1.2.0 |
Changed in sikuli: | |
status: | In Progress → Fix Released |
summary: |
- [1.0] IDE: Importing doesn't work when imported file changes: Requires - Sikuli restart + IDE: Importing doesn't work when imported file changes: Requires Sikuli + restart |
Known problem.
Look docs: reload()
# coding: utf-8
from sikuli import *
... Not needed in main.sikuli
from sikuli import *
... Only needed in subs.sikuli