Jump to content

Question

Posted

Morning all. Today, i add a npc and i get little errors in init.py, in L2DatabaseFactory. In console, error is 

 

  File "custom/50300_PKlist/__init__.py", line 58, in onEvent
AttributeError: class 'com.l2jserver.L2DatabaseFactory' has no attribute 'close'

and in init.py is setted 

L2DatabaseFactory.close(con)

Thank you!

3 answers to this question

Recommended Posts

  • 0
Posted

Guess error is clear. Check other .py files if they are using the db connection and see how to close it / check the file itself for the method.

Anyway, you should not use old .py files. 

  • 0
Posted (edited)

as sweets said you can open another .py file to see how database connections are closing connection.

you can try this one

try : con.close()
except : pass

 

Edited by melron
  • 0
Posted (edited)
Traceback (innermost last):
  (no code object) at line 0
SyntaxError: ('inconsistent dedent', ('custom/50300_PKlist/__init__.py', 58, 15, '              con.close()\t\t '))

No work 

con.close()

 

Edited by InFocus

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...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock