Jump to content


Photo

VirtualKeyBoard.py


  • Please log in to reply
35 replies to this topic

#1 Dimitrij

  • PLi® Core member
  • 9,986 posts

+338
Excellent

Posted 30 October 2013 - 19:01

 ru lang

unknown action WizardActions/down! typo in keymap?
action ->  WizardActions down
unknown action WizardActions/down! typo in keymap?
action ->  WizardActions down
unknown action WizardActions/down! typo in keymap?
unicode U+25bb not present
unicode U+25c5 not present
unicode U+25bb not present
unicode U+25c5 not present
unicode U+25bb not present
action ->  WizardActions down
unknown action WizardActions/down! typo in keymap?
unicode U+25bb not present
unicode U+25c5 not present
unicode U+25bb not present
unicode U+25c5 not present
unicode U+25bb not present
action ->  WizardActions up
unknown action WizardActions/up! typo in keymap?
unicode U+25bb not present
unicode U+25c5 not present
unicode U+25bb not present
unicode U+25c5 not present
unicode U+25bb not present
action ->  WizardActions up
unknown action WizardActions/up! typo in keymap?
unicode U+25bb not present
unicode U+25c5 not present
unicode U+25bb not present
unicode U+25c5 not present
unicode U+25bb not present
action ->  WizardActions up
unknown action WizardActions/up! typo in keymap?
action ->  WizardActions back
unicode U+  97 not present
unicode U+  85 not present
action ->  ColorActions blue
glyph index 25 in eLabel out of bounds!
action ->  WizardActions left
action ->  OkCancelActions ok
glyph index 24 in eLabel out of bounds!
action ->  OkCancelActions ok
glyph index 23 in eLabel out of bounds!
action ->  OkCancelActions ok
glyph index 22 in eLabel out of bounds!
action ->  OkCancelActions ok
glyph index 21 in eLabel out of bounds!
action ->  WizardActions down
action ->  WizardActions down
action ->  WizardActions down
action ->  OkCancelActions ok
action ->  OkCancelActions ok
action ->  WizardActions up
action ->  WizardActions up
action ->  WizardActions up
action ->  OkCancelActions ok
action ->  WizardActions left
action ->  WizardActions left
action ->  WizardActions left
action ->  WizardActions left
action ->  WizardActions left
action ->  WizardActions left
action ->  WizardActions left
action ->  WizardActions down
action ->  WizardActions down
action ->  OkCancelActions ok
action ->  WizardActions right
action ->  WizardActions right
action ->  OkCancelActions ok
Traceback (most recent call last):
  File "/usr/lib/enigma2/python/Components/ActionMap.py", line 66, in action
  File "/usr/lib/enigma2/python/Components/ActionMap.py", line 46, in action
  File "/usr/lib/enigma2/python/Screens/VirtualKeyBoard.py", line 323, in okClicked
  File "/usr/lib/enigma2/python/Components/Input.py", line 259, in char
  File "/usr/lib/enigma2/python/Components/Input.py", line 58, in update
UnicodeDecodeError: 'utf8' codec can't decode byte 0xd0 in position 0: invalid continuation byte

 


GigaBlue UHD Quad 4K /Lunix3-4K/Solo 4K


Re: VirtualKeyBoard.py #2 littlesat

  • PLi® Core member
  • 56,226 posts

+691
Excellent

Posted 30 October 2013 - 20:09

Search for the typo in the keymap...

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: VirtualKeyBoard.py #3 Dimitrij

  • PLi® Core member
  • 9,986 posts

+338
Excellent

Posted 30 October 2013 - 21:30

Search for the typo in the keymap...

	def okClicked(self):
		self.smsChar = None
		text = (self.shiftMode and self.shiftkeys_list or self.keys_list)[self.selectedKey / 12][self.selectedKey % 12].encode("UTF-8")

+		prev_text = self["text"].getText()
+		self["text"].setText(prev_text)

		if text == "EXIT":

GigaBlue UHD Quad 4K /Lunix3-4K/Solo 4K


Re: VirtualKeyBoard.py #4 littlesat

  • PLi® Core member
  • 56,226 posts

+691
Excellent

Posted 30 October 2013 - 21:33

Why should that work-a-round be done.... It is not required here???

What exactly are you doing to trigger this GSOD?


Edited by littlesat, 30 October 2013 - 21:36.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: VirtualKeyBoard.py #5 Dimitrij

  • PLi® Core member
  • 9,986 posts

+338
Excellent

Posted 30 October 2013 - 21:36

Why should that work-a-round be done.... It is not required here???

first text decode("UTF-8")


GigaBlue UHD Quad 4K /Lunix3-4K/Solo 4K


Re: VirtualKeyBoard.py #6 littlesat

  • PLi® Core member
  • 56,226 posts

+691
Excellent

Posted 30 October 2013 - 21:38

I did try russian aswell without any problems?


WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: VirtualKeyBoard.py #7 littlesat

  • PLi® Core member
  • 56,226 posts

+691
Excellent

Posted 30 October 2013 - 21:45

Could it be the tekst delivered as input isn't encoded in utf-8?

 

  self["country"] = StaticText("")
  self["header"] = Label(title)
  kwargs["text"] = kwargs.get("text", "").encode("utf-8")
  self["text"] = Input(currPos=len(kwargs["text"]), allMarked=False, **kwargs)
  self["list"] = VirtualKeyBoardList([])

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: VirtualKeyBoard.py #8 Dimitrij

  • PLi® Core member
  • 9,986 posts

+338
Excellent

Posted 30 October 2013 - 21:45

I did try russian aswell without any problems?

it seems everything is OK...


GigaBlue UHD Quad 4K /Lunix3-4K/Solo 4K


Re: VirtualKeyBoard.py #9 Dimitrij

  • PLi® Core member
  • 9,986 posts

+338
Excellent

Posted 30 October 2013 - 21:49

Could it be the tekst delivered as input isn't encoded in utf-8?

 

 

  self["country"] = StaticText("")
  self["header"] = Label(title)
  kwargs["text"] = kwargs.get("text", "").encode("utf-8")
  self["text"] = Input(currPos=len(kwargs["text"]), allMarked=False, **kwargs)
  self["list"] = VirtualKeyBoardList([])

This is add new letters of the alphabet:

		elif self.lang == 'ru_RU':
			self.keys_list = [

Edited by Dima73, 30 October 2013 - 21:50.

GigaBlue UHD Quad 4K /Lunix3-4K/Solo 4K


Re: VirtualKeyBoard.py #10 littlesat

  • PLi® Core member
  • 56,226 posts

+691
Excellent

Posted 30 October 2013 - 21:50

Is it OK now or isn't and I do no see the new letters...


Edited by littlesat, 30 October 2013 - 21:54.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: VirtualKeyBoard.py #11 Dimitrij

  • PLi® Core member
  • 9,986 posts

+338
Excellent

Posted 30 October 2013 - 21:53

Is it OK now or isn't

yes,ok


GigaBlue UHD Quad 4K /Lunix3-4K/Solo 4K


Re: VirtualKeyBoard.py #12 littlesat

  • PLi® Core member
  • 56,226 posts

+691
Excellent

Posted 30 October 2013 - 21:56

With my latest changes... and where are the new russian characters?


WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: VirtualKeyBoard.py #13 Dimitrij

  • PLi® Core member
  • 9,986 posts

+338
Excellent

Posted 30 October 2013 - 22:13

With my latest changes... and where are the new russian characters?

Sorry, I did not understand.
You can wait for crash-logs of other users.


GigaBlue UHD Quad 4K /Lunix3-4K/Solo 4K


Re: VirtualKeyBoard.py #14 littlesat

  • PLi® Core member
  • 56,226 posts

+691
Excellent

Posted 30 October 2013 - 22:15

in post #9 you mentioned

 

This is add new letters of the alphabet:

 

I can only see two lines... no new letters of the alphabet.

 

i just committed the patch that it is ensured the unput is encoded in utf-8.... so I would not expect the GSOD anymore.


WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: VirtualKeyBoard.py #15 Dimitrij

  • PLi® Core member
  • 9,986 posts

+338
Excellent

Posted 30 October 2013 - 22:24

in post #9 you mentioned

 

This is add new letters of the alphabet:

 

I can only see two lines... no new letters of the alphabet.

 

i just committed the patch that it is ensured the unput is encoded in utf-8.... so I would not expect the GSOD anymore.

example:

open VirtualKeyBoard(ChannelSelection ->rename entry)
Delete all text
Write a new text
through VirtualKeyBoard(ru lang).


Edited by Dima73, 30 October 2013 - 22:26.

GigaBlue UHD Quad 4K /Lunix3-4K/Solo 4K


Re: VirtualKeyBoard.py #16 ims

  • PLi® Core member
  • 13,621 posts

+211
Excellent

Posted 31 October 2013 - 07:22

I think, you must try make it on some channel in AZBUKA.

Similar problems are, when trying rename file in Movieplayer - file with national chars is copied into box via ftp or windows => there in Movieplayer in filename are some chars dropped or wrong displayed. When you try rename it, enigma crash immediatelly with:

 

unknown action DirectionActions/downUp! typo in keymap?
action ->  MovieSelectionActions contextMenu
action ->  OkCancelActions ok
Screen <class 'Screens.VirtualKeyBoard.VirtualKeyBoard'>((), {'text': 'Vor v zakon\xec, vl\xe1dce podsv\xect\xed  - Thieves by Law.avi', 'title': 'P\xc5\x99ejmenovat'}): <type 'exceptions.UnicodeDecodeError'>
Traceback (most recent call last):
  File "/usr/lib/enigma2/python/mytest.py", line 225, in create
    return screen(self, *arguments, **kwargs)
  File "/usr/lib/enigma2/python/Screens/VirtualKeyBoard.py", line 74, in __init__
UnicodeDecodeError: 'utf8' codec can't decode byte 0xec in position 11: invalid continuation byte
Traceback (most recent call last):
  File "/usr/lib/enigma2/python/mytest.py", line 191, in processDelay
    callback(*retval)
  File "/usr/lib/enigma2/python/Screens/MovieSelection.py", line 1016, in doneContext
    action()
  File "/usr/lib/enigma2/python/Screens/MovieSelection.py", line 1403, in do_rename
    text = name)
  File "/usr/lib/enigma2/python/mytest.py", line 293, in openWithCallback
    dlg = self.open(screen, *arguments, **kwargs)
  File "/usr/lib/enigma2/python/mytest.py", line 304, in open
    dlg.isTmp = True
AttributeError: 'NoneType' object has no attribute 'isTmp'
(PyObject_CallObject(<bound method Session.processDelay of <__main__.Session instance at 0x1b29d28>>,()) failed)
getResolvedKey config.plugins.crashlogautosubmit.sendAnonCrashlog failed !! (Typo??)
getResolvedKey config.plugins.crashlogautosubmit.addNetwork failed !! (Typo??)
getResolvedKey config.plugins.crashlogautosubmit.addWlan failed !! (Typo??)

 

But about this problem I wrote some time ago - without any answer ;)

 


Kdo nic nedělá, nic nezkazí!

Re: VirtualKeyBoard.py #17 littlesat

  • PLi® Core member
  • 56,226 posts

+691
Excellent

Posted 31 October 2013 - 08:51

ims,

 

could you help to solve this... is it an incorrect character or so in the table? I cannot read Russian so for me it is extreme difficult to fix.

 

At least I see this 'Vor v zakon\xec, vl\xe1dce podsv\xect\xed'

 

There are in ChannelSelection .py already some of those characters removed... (line 528)

 

name.replace('\xc2\x86', '').replace('\xc2\x87', '')

 

So I suggest the solution must be somewhere there....

 

in fact it is the provider sending this "rubish"... and because we never had edit service name before we did not get this issue. The issue is therefore not Virtual Keybord related.


Edited by littlesat, 31 October 2013 - 08:57.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: VirtualKeyBoard.py #18 littlesat

  • PLi® Core member
  • 56,226 posts

+691
Excellent

Posted 31 October 2013 - 09:15

If I make this little python program...

 

print 'Vor v zakon\xec, vl\xe1dce podsv\xect\xed'.encode('utf-8')

I get the same issue

 

Traceback (most recent call last):
  File "test", line 1, in <module>
    print 'Vor v zakon\xec, vl\xe1dce podsv\xect\xed'.encode('utf-8')
UnicodeDecodeError: 'utf8' codec can't decode byte 0xec in position 11: invalid continuation byte
 


WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: VirtualKeyBoard.py #19 ims

  • PLi® Core member
  • 13,621 posts

+211
Excellent

Posted 31 October 2013 - 09:26

my example is not in russian. It is flle with czech chars in name, which is copied to box from Win PC via ftp.

 

Try create dummy file under Win, f.eg:  test_ěščřžýáíé.ts  and copy it to box via ftp to movies. Then you can try it.

 

note: "Vor v zakon\xec, vl\xe1dce podsv\xect\xed'  is original "Vor v zákoně, vládce podsvětí"


Kdo nic nedělá, nic nezkazí!

Re: VirtualKeyBoard.py #20 ims

  • PLi® Core member
  • 13,621 posts

+211
Excellent

Posted 31 October 2013 - 09:36

this is used for this file in e2:  'test_\xec\x9a\xe8\xf8\x9e\xfd\xe1\xed\xe9.ts'

and on picture is, how it is displayed in movieplayer.

 

 

EDIT: rename plugin works better with it - it do not displaying nat chars ( display only "test_" ), but do not crashing and is possible rename file.

Attached Files


Edited by ims, 31 October 2013 - 09:41.

Kdo nic nedělá, nic nezkazí!


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users