← Back to team overview

sikuli-driver team mailing list archive

[Question #799923]: 2.0.6 import does not work on macOS14 sonoma

 

New question #799923 on SikuliX:
https://answers.launchpad.net/sikuli/+question/799923

I tried to migrate my scripts from macOS 12 to macOS 14.
On macOS 12, I used Sikulix 2.0.5 and now I use 2.0.6 on macOS 14.

When I check script, it stop at importing module which worked on 2.0.5.
I tried to check other post and try to fix it, but not work.

Can anybody check where is wrong?

=========

logfolder.py

=========

import shutil
import os
import os.path
import datetime

from sikuli import *
use()

def mklogfolderlogout(): 
    now = datetime.datetime.now()
    new_dir_path = 'screenshots/logout/' +  now.strftime('%Y%m%d_%H%M%S')
    os.makedirs(new_dir_path)
    return(new_dir_path)

def mklogfolderlogin(): 
    now = datetime.datetime.now()
    new_dir_path = 'screenshots/login/' +  now.strftime('%Y%m%d_%H%M%S')
    os.makedirs(new_dir_path)
    return(new_dir_path)
=============

UItest.py

============
import datetime
import os

import sys
sys.path.append("\logfolder.sikuli")
import logfolder

#import sys
#sys.path.append(".\check_signin_status")
#import check_signin_status

import sys
sys.path.append(".\account_screen")
import account_screen


logpath = logfolder.mklogfolderlogout()
print(logpath)
wait(3)


launch_MF.launch_mf(logpath)
wait(3)


=======


>From UItest.py, I try to call logfolder.py's code.
but It stop at the  [import logfolder] part.

Error message is 

[error] script [ UITest ] stopped with error in line 14
[error] ImportError ( No module named logfolder )
[error] --- Traceback --- error source first
line: module ( function ) statement 
14: main (  <module> )     import logfolder
[error] --- Traceback --- end --------------

Please help....

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