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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • 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