← Back to team overview

sikuli-driver team mailing list archive

[Bug 1842775] Re: region.text() fails with UnicodeEncodeError

 

Since there was nothing changed in this area: the content of the match a
contains at least 1 unicode character now.

Region.text() returns unicode characters, if any are read.

print ucode(a.text())

should work.

** Changed in: sikuli
       Status: New => Opinion

** Changed in: sikuli
     Assignee: (unassigned) => RaiMan (raimund-hocke)

** Changed in: sikuli
    Milestone: None => 1.1.4

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1842775

Title:
  region.text() fails with UnicodeEncodeError

Status in Sikuli:
  Opinion

Bug description:
  region.text() fails with UnicodeEncodeError build 377

  works fine with build 362

  SikulixIDE-1.1.4 bundle 377
  Win10 64 bit

  a = find("myText.png")
  print a

  print a.text()

  ===================================

  M[159,719 101x21]@S(0) S:1.00 C:209,729 [2208 msec]
  [error] script [ demo ] stopped with error in line 4
  [error] UnicodeEncodeError ( 'ascii' codec can't encode character u'\u2018' in position 1: ordinal not in range(128) )
  [error] --- Traceback --- error source first
  line: module ( function ) statement 
  4: main (  <module> )     print a.text()
  [error] --- Traceback --- end --------------
  1.1.4-SNAPSHOT-#377-2019-08-27_11:57/Windows10.0/Java8(64)1.8.0_201-b09

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1842775/+subscriptions


References