Jump to content

Python int too large to convert to C long


Recommended Posts

  • Bot

Following problem:
My client starts for a short while... so the client open and close after 3-4 seconds.
I found the following line at the log.txt:
LoginWindow.__LoadScript.LoadObject - <type 'exceptions.OverflowError'>:Python int too large to convert to C long

full log::

Spoiler

1224 23:02:22255 :: ¾Ë¸²: ÆÄÀÏ ¸ðµåÀÔ´Ï´Ù.
1224 23:02:00003 ::
1224 23:02:00004 :: ## Network - OffLine Phase ##
1224 23:02:00004 ::
1224 23:02:00041 :: importing from pack debugInfo
1224 23:02:00043 :: importing from pack localeInfo
1224 23:02:00049 :: importing from pack constInfo
1224 23:02:00060 :: importing from pack mouseModule
1224 23:02:00062 :: importing from pack ui
1224 23:02:00085 :: importing from pack networkModule
1224 23:02:00087 :: importing from pack playerSettingModule
1224 23:02:00100 :: importing from pack emotion
1224 23:02:00102 :: importing from pack uiPhaseCurtain
1224 23:02:00102 :: importing from pack uiCandidate
1224 23:02:00104 :: importing from pack musicInfo
1224 23:02:00104 :: importing from pack stringCommander
1224 23:02:07307 :: CANNOT_FIND_PACK_FILE [sound/effect/etc/dropitem/dropitem.mss]
1224 23:02:07307 :: SYSERR: CANNOT_FIND_PACK_FILE [sound/effect/etc/dropitem/dropitem.mss]
1224 23:02:07342 :: NEWMAIN STREAM ----------------------------------------------------------------------------1224 23:02:07342 ::
1224 23:02:07343 :: NEW POPUP DIALOG ----------------------------------------------------------------------------1224 23:02:07343 ::
1224 23:02:07343 :: importing from pack exception
1224 23:02:07344 :: ===== Load Script File : UIScript/PopupDialog.py1224 23:02:07344 ::
1224 23:02:07345 :: importing from pack uiScriptLocale
1224 23:02:07370 :: NEW CURTAIN ----------------------------------------------------------------------------1224 23:02:07370 ::
1224 23:02:07370 ::
1224 23:02:07371 :: ## Network - OffLine Phase ##
1224 23:02:07372 ::
1224 23:02:07373 :: importing from pack introLogin
1224 23:02:07380 :: importing from pack serverInfo
1224 23:02:07381 :: importing from pack uiCommon
1224 23:02:07384 :: importing from lib time
1224 23:02:07385 :: importing from pack ServerCommandParser
1224 23:02:07386 :: NEW LOGIN WINDOW ----------------------------------------------------------------------------1224 23:02:07386 ::
1224 23:02:07387 :: LOGIN WINDOW OPEN ----------------------------------------------------------------------------1224 23:02:07387 ::
1224 23:02:07387 :: ===== Load Script File : locale/de/ui/LoginWindow.py1224 23:02:07387 ::
1224 23:02:07549 :: ui:2825: RuntimeWarning: tp_compare didn't return -1 or -2 for exception
1224 23:02:07549 :: SYSERR: ui:2825: RuntimeWarning: tp_compare didn't return -1 or -2 for exception
1224 23:02:07551 ::
introLogin.py(line:499) __LoadScript
ui.py(line:2818) LoadScriptFile
ui.py(line:3008) LoadChildren
ui.py(line:3008) LoadChildren
ui.py(line:2825) LoadChildren
LoginWindow.__LoadScript.LoadObject - <type 'exceptions.OverflowError'>:Python int too large to convert to C long
1224 23:02:07551 :: SYSERR:
introLogin.py(line:499) __LoadScript
ui.py(line:2818) LoadScriptFile
ui.py(line:3008) LoadChildren
ui.py(line:3008) LoadChildren
ui.py(line:2825) LoadChildren
LoginWindow.__LoadScript.LoadObject - <type 'exceptions.OverflowError'>:Python int too large to convert to C long
1224 23:02:07551 :: ============================================================================================================
1224 23:02:07552 :: SYSERR: ============================================================================================================
1224 23:02:07552 :: Abort!!!!

1224 23:02:07552 :: SYSERR: Abort!!!!

1224 23:02:07567 ::
system.py(line:273) RunMainScript
system.py(line:192) execfile
system.py(line:163) Run
prototype.py(line:60) <module>
prototype.py(line:51) RunApp
networkModule.py(line:178) SetLoginPhase
networkModule.py(line:138) SetPhaseWindow
networkModule.py(line:150) __ChangePhaseWindow
introLogin.py(line:227) Open
introLogin.py(line:502) __LoadScript
exception.py(line:36) Abort
Run - <type 'exceptions.SystemExit'>:
1224 23:02:07568 :: ============================================================================================================
1224 23:02:07570 :: SYSERR: ============================================================================================================
1224 23:02:07580 :: Abort!!!!

1224 23:02:07581 :: SYSERR: Abort!!!!

1224 23:02:07584 :: granny_shared_vbs:
1224 23:02:07584 :: SYSERR: granny_shared_vbs:
1224 23:02:07584 :: 0: 40
1224 23:02:07585 :: SYSERR: 0: 40
1224 23:02:07585 :: 1: 20
1224 23:02:07585 :: SYSERR: 1: 20
1224 23:02:07585 :: 2: 20
1224 23:02:07585 :: SYSERR: 2: 20
1224 23:02:07585 :: 3: 40
1224 23:02:07586 :: SYSERR: 3: 40
1224 23:02:07586 :: 4: 0
1224 23:02:07587 :: SYSERR: 4: 0
1224 23:02:07587 :: 5: 20
1224 23:02:07588 :: SYSERR: 5: 20
1224 23:02:07588 :: 6: 0
1224 23:02:07588 :: SYSERR: 6: 0
1224 23:02:07588 :: 7: 0
1224 23:02:07588 :: SYSERR: 7: 0
1224 23:02:07588 :: 8: 0
1224 23:02:07589 :: SYSERR: 8: 0
1224 23:02:07589 :: CResourceManager::__DestroyDeletingResourceMap 35
1224 23:02:07589 :: CResourceManager::__DestroyResourceMap 70
1224 23:02:08177 :: CResourceManager::__DestroyResourceMap 0
1224 23:02:08181 :: CPythonBackground Clear
1224 23:02:08185 :: PythonIME Clear
1224 23:02:08189 :: PythonNetworkMainStream Clear
1224 23:02:08191 :: Python Graphic Clear

 

I found two solutions how to fix this problem:
1. add following to the PythonUtils.cpp:

Spoiler


// Python int too large to convert to C long
#define PyLong_AsLong PyLong_AsLongLong
#define PyLong_AsUnsignedLong PyLong_AsUnsignedLongLong
#include "StdAfx.h"
#include "PythonUtils.h"

Same problem...

I found an old thread at this forum who told me this:

Add this to system.py:

Spoiler

def StringColorToInt(colorstring):
    import grp
 
    colorstring = colorstring.strip()
 
    if len(colorstring) != 8:
        raise ValueError, "input #%s is not in #AARRGGBB format" % colorstring
 
    a, r, g, b = colorstring[:2], colorstring[2:4], colorstring[4:6],colorstring[6:8]
    a, r, g, b = [int(n, 16) for n in (a, r, g, ]
 
    return grp.GenerateColor(float® / 255.0, float(g) / 255.0, float( / 255.0, float(a) / 255.0)
 
__builtin__.CTOA = StringColorToInt

Change at root/locale/uiscript all:
0x...... = CTOA(".....")
After this i got another error: prntscr.com/dnjp0z


full log:

Spoiler

1224 23:15:09296 :: ¾Ë¸²: ÆÄÀÏ ¸ðµåÀÔ´Ï´Ù.
1224 23:15:00003 ::
1224 23:15:00004 :: ## Network - OffLine Phase ##
1224 23:15:00004 ::
1224 23:15:02141 :: Traceback:
Call: File "<string>", line 1, in <module>

1224 23:15:02141 :: RunMain Error
1224 23:15:02141 :: SYSERR: RunMain Error
1224 23:15:02143 :: granny_shared_vbs:
1224 23:15:02143 :: SYSERR: granny_shared_vbs:
1224 23:15:02143 :: 0: 0
1224 23:15:02143 :: SYSERR: 0: 0
1224 23:15:02143 :: 1: 0
1224 23:15:02144 :: SYSERR: 1: 0
1224 23:15:02144 :: 2: 0
1224 23:15:02144 :: SYSERR: 2: 0
1224 23:15:02144 :: 3: 0
1224 23:15:02144 :: SYSERR: 3: 0
1224 23:15:02144 :: 4: 0
1224 23:15:02144 :: SYSERR: 4: 0
1224 23:15:02144 :: 5: 0
1224 23:15:02144 :: SYSERR: 5: 0
1224 23:15:02144 :: 6: 0
1224 23:15:02144 :: SYSERR: 6: 0
1224 23:15:02144 :: 7: 0
1224 23:15:02144 :: SYSERR: 7: 0
1224 23:15:02144 :: 8: 0
1224 23:15:02145 :: SYSERR: 8: 0
1224 23:15:02145 :: CResourceManager::__DestroyDeletingResourceMap 0
1224 23:15:02146 :: CResourceManager::__DestroyResourceMap 0
1224 23:15:02148 :: CResourceManager::__DestroyResourceMap 0
1224 23:15:02148 :: CPythonBackground Clear
1224 23:15:02151 :: PythonIME Clear
1224 23:15:02152 :: PythonNetworkMainStream Clear
1224 23:15:02154 :: Python Graphic Clear

 

Syserr was empty at both errors!!
Anyone any idee?

Edited by Metin2 Dev
Core X - External 2 Internal

english_banner.gif

Link to comment
Share on other sites

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Bot
2 hours ago, arves100 said:

I released an update to python 2.7.12, you can find on this forum. Or you can try python 2.7.6 i saw in some client that

I fixxed the problem already, but thanks!

I think i will use Python 2.7.12 aswell.

 

Currently i got this error:

Spoiler

1229 21:11:07263 ::
1229 21:11:07289 :: SYSERR: Traceback (most recent call last):

1229 21:11:07290 :: SYSERR:   File "uiPhaseCurtain.py", line 61, in OnUpdate

1229 21:11:07291 :: SYSERR:   File "networkModule.py", line 150, in __ChangePhaseWindow

1229 21:11:07293 :: SYSERR:   File "introLogin.py", line 284, in Open

1229 21:11:07293 :: SYSERR:   File "introLogin.py", line 1129, in __RefreshServerList

1229 21:11:07293 :: SYSERR: AttributeError
1229 21:11:07294 :: SYSERR: :
1229 21:11:07294 :: SYSERR: 'module' object has no attribute 'REGION_DICT'
1229 21:11:07294 :: SYSERR:

 

I dont know where i need to import REGION_DICT..

Do you know howto fix?

 

english_banner.gif

Link to comment
Share on other sites

  • Bot
2 minutes ago, arves100 said:

REGION_DICT = {
    0 : {
        1 : { "name" :"My Server, "channel" : SERVER01_DICT, },                        
    },
}

You are missing this on server info

I have this already... and import serverinfo.. this is my problem xD

https://metin2.download/picture/awL20lYi1Yad18K4i6bNhJKkXSU1X9B8/.png

Edited by Metin2 Dev
Core X - External 2 Internal

english_banner.gif

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 13

      Metin2 Closed Beta Content (2003-2004)

    2. 0

      PRESENTATION PAGE [OLDGODSMT2 RELEASE]

    3. 25

      [SRC] Metin2 on LINUX - The Old Metin2 Project

    4. 2

      United/Club/Midgard serverfiles?

    5. 13

      Metin2 Closed Beta Content (2003-2004)

    6. 13

      Metin2 Closed Beta Content (2003-2004)

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.