IDE: Importing doesn't work when imported file changes: Requires Sikuli restart

Bug #1188186 reported by Aki Sivula
10
This bug affects 2 people
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

Tags: idererun
Aki Sivula (aki-sivula)
description: updated
description: updated
Revision history for this message
RaiMan (raimund-hocke) wrote :

Known problem.
Look docs: reload()

# coding: utf-8
from sikuli import *
... Not needed in main.sikuli

from sikuli import *
... Only needed in subs.sikuli

Changed in sikuli:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.1.0
summary: - Importing doesn't work when imported file changes: Requires Sikuli
- restart
+ [1.0] IDE: Importing doesn't work when imported file changes: Requires
+ Sikuli restart
RaiMan (raimund-hocke)
tags: added: idererun
RaiMan (raimund-hocke)
description: updated
Revision history for this message
Aki Sivula (aki-sivula) wrote : Re: [1.0] IDE: Importing doesn't work when imported file changes: Requires Sikuli restart

workaround seems to work, thanks.

RaiMan (raimund-hocke)
Changed in sikuli:
status: Confirmed → In Progress
RaiMan (raimund-hocke)
Changed in sikuli:
milestone: 1.1.0 → 1.2.0
RaiMan (raimund-hocke)
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
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.