Novice in Sikulix and Jython

Asked by Bjørnar Hallset

I just downloaded Sikulix 2.0.4 and Jython 2.7.1 and installed them.
I tried a script with this:
--
discount = 0
amount = input("Enter Amount")
if amount>1000:
   discount = amount*0.10
elif amount>500:
   discount = amount*0.05
else:
   discount = 0
print 'Discount = ',discount
print 'Net amount = ',amount-discount
--
Only an error occurs when run:
---
Exception in thread "Thread-39" Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\Bj\xf8rnar\AppData\Roaming\Sikulix\Lib\sikuli\__init__.py", line 3, in <module>
    from Sikuli import *
  File "C:\Users\Bj\xf8rnar\AppData\Roaming\Sikulix\Lib\sikuli\Sikuli.py", line 3, in <module>
    from __future__ import with_statement
ImportError: No module named __future__
---

Is the problem here? My name is Bjørnar (with a norwegian letter ø )
This seems to be translated til \xf8

How do I check that my installation is OK?

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
masuo
Solved:
Last query:
Last reply:
Revision history for this message
Bjørnar Hallset (tiooso) said :
#1

Version: 2.0.4-2020-03-14_08:01/Windows10.0/Java8(64)1.8.0_271-b09

Revision history for this message
Best masuo (masuo-ohara) said :
#2

I think the cause of the error is the user name you are using.
Try following steps.
(1)Create new user whose name do not contain non-ASCII characters.
(2)Sign in with your new username.
(3)Setup SikuliX and run script.

Revision history for this message
Bjørnar Hallset (tiooso) said :
#3

Thanks masuo, that solved my question.