Jump to content

Recommended Posts

Hey guys, in my other files everything works perfect with character select, but if i put the character select in new clean client with clean serverfiles this error comes:

 

 

can someone maybe help or explain why? Since everything is exactly the same, i really dont know what's going on

Link to comment
https://metin2.dev/topic/20892-python-key-error/
Share on other sites

  • Forum Moderator
  • exception KeyError

Raised when a mapping (dictionary) key is not found in the set of existing keys.

For example:

mydict = {
  'EmpireName': ui.TextLine, 
  'GuildImage': ui.ExpandedImageBox
}

>>> empireName = mydict['EmpireName']
# <ui.TextLine object at 0x06FC3310>

>>> guildImage = mydict['SkillName']
# Traceback (most recent call last):
#   File "<stdin>", line 1, in <module>
# KeyError: 'SkillName'

Check your selectcharacterwindow.py and be sure you have the object called 'EmpireName'.

  • Love 1
Link to comment
https://metin2.dev/topic/20892-python-key-error/#findComment-113283
Share on other sites

vor 31 Minuten schrieb VegaS™:
  • exception KeyError

Raised when a mapping (dictionary) key is not found in the set of existing keys.

For example:


mydict = {
  'EmpireName': ui.TextLine, 
  'GuildImage': ui.ExpandedImageBox
}

>>> empireName = mydict['EmpireName']
# <ui.TextLine object at 0x06FC3310>

>>> guildImage = mydict['SkillName']
# Traceback (most recent call last):
#   File "<stdin>", line 1, in <module>
# KeyError: 'SkillName'

Check your selectcharacterwindow.py and be sure you have the object called 'EmpireName'.

 

Thank you for your answer Vegas!

 

but im using the same files on a other Client and no keyError is appearing there, but on my new clean Client i receive keyerror. (And EmpireName is existing i Can post my Python file if you want)

Link to comment
https://metin2.dev/topic/20892-python-key-error/#findComment-113287
Share on other sites

  • Forum Moderator
5 minutes ago, Syriza said:

edit: solved, empireName wasn't the problem a class was missing in ui.py

@VegaS™

Of course, the output of syserr or in generally the lines which showing the errors are not printed 100% the line fixed with the problem, there could be a syntax error, missing things etc. Before/after your EmpireName object too, and blocked while reading the code and your dictionary have missed some objects.

We can't fix a error all time just because of one line in syserr, you need to investigate the files related and see what's the real problem and use debug method. 

  • Love 1
Link to comment
https://metin2.dev/topic/20892-python-key-error/#findComment-113305
Share on other sites

vor 1 Minute schrieb VegaS™:

Of course, the output of syserr or in generally the lines which showing the errors are not printed 100% the line fixed with the problem, there could be a syntax error, missing things etc. Before/after your EmpireName object too, and blocked while reading the code and your dictionary have missed some objects.

We can't fix a error all time just because of one line in syserr, you need to investigate the files related and see what's the real problem and use debug method. 

 

thank you for help buddy i just wanted to say so other people know too

Link to comment
https://metin2.dev/topic/20892-python-key-error/#findComment-113306
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.