Jump to content
  • 0

Python script Help me please


dev951

Question

Hi MX members, i have a problem with the russian characters. I've a "change name" script as .py (python) file. Please tell me how can allow only English alphabetic chars? I need that code. Thank big!

Link to comment
Share on other sites

Recommended Posts

  • 0
File "__init__.py", line 45, in onAdvEvent
LookupError: no codec search functions registered: can't find encoding

	at org.python.core.codecs.lookup(Unknown Source)
	at org.python.core.codecs.getEncoder(Unknown Source)
	at org.python.core.codecs.encode(Unknown Source)
	at org.python.core.PyString.str_encode(Unknown Source)
	at org.python.core.PyString.str_encode(Unknown Source)
	at org.python.core.PyString$1exposed_encode.__call__(Unknown Source)
	at org.python.core.PyObject.invoke(Unknown Source)
	at org.python.pycode.serializable._pyx1629403727261.onAdvEvent$3(__init__.py:45)
	at org.python.pycode.serializable._pyx1629403727261.call_function(__init__.py)
	at org.python.core.PyTableCode.call(Unknown Source)
	at org.python.core.PyTableCode.call(Unknown Source)
	at org.python.core.PyTableCode.call(Unknown Source)
	at org.python.core.PyFunction.__call__(Unknown Source)
	at org.python.core.PyMethod.__call__(Unknown Source)
	at org.python.core.PyObject.__call__(Unknown Source)
	at org.python.core.PyObject._jcallexc(Unknown Source)
	at org.python.core.PyObject._jcall(Unknown Source)
	at org.python.proxies.main$Quest$2.onAdvEvent(Unknown Source)
	at ru.catssoftware.gameserver.model.quest.Quest.notifyEvent(Unknown Source)
	at ru.catssoftware.gameserver.model.actor.instance.L2PcInstance.processQuestEvent(Unknown Source)
	at ru.catssoftware.gameserver.network.clientpackets.RequestBypassToServer.runImpl(Unknown Source)
	at ru.catssoftware.gameserver.network.clientpackets.L2GameClientPacket.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

Again(

5 minutes ago, melron said:

change the encode() to encode('utf-8') and check it

Can we redirect this error to any htmltext when the new name is with russian characters?

Link to comment
Share on other sites

  • 0
6 minutes ago, dev951 said:

Can we redirect this error to any htmltext when the new name is with russian characters?

This is exactly what you asked at your main post :D.

 

try to import encodings

import encodings

 

if does not work too, you have two options.

 

  1. install python on your computer to have access at the encodings folder in order python will read them from your program files
  2. delete that script and do it via java
Edited by melron
Link to comment
Share on other sites

  • 0
On 8/19/2021 at 11:17 PM, melron said:

This is exactly what you asked at your main post :D.

 

try to import encodings

import encodings

 

if does not work too, you have two options.

 

  1. install python on your computer to have access at the encodings folder in order python will read them from your program files
  2. delete that script and do it via java

I haven't encodings, when i type import e (here appears: import encode) and with that also doesn't works.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...