Forss 0 Posted July 5, 2017 Подскажите как понимаю ошибка с импортом имени в базу Error on: /home/game/data/scripts/custom/auction/__init__.py.error.log Line: -1 - Column: -1 Traceback (innermost last): File "__init__.py", line 4, in ? ImportError: cannot import name DatabaseFactory как понимаю импорты происходят вот тут try: con=DatabaseFactory.getInstance().getConnection() if type2 >= 0: st=con.prepareStatement("SELECT id, itemId, enchant, augment, augLvl, price, money, ownerId, shadow FROM `z_stock_items` WHERE `type` = ? ORDER BY `id` DESC LIMIT ?, ?") st.setInt(1, type2) st.setInt(2, limit1) st.setInt(3, limit2) elif itemId > 0: st=con.prepareStatement("SELECT id, itemId, enchant, augment, augLvl, price, money, ownerId, shadow FROM `z_stock_items` WHERE `itemId` = ? ORDER BY `id` DESC LIMIT ?, ?") st.setInt(1, itemId) st.setInt(2, limit1) st.setInt(3, limit2) elif augment > 0: st=con.prepareStatement("SELECT id, itemId, enchant, augment, augLvl, price, money, ownerId, shadow FROM `z_stock_items` WHERE `augment` = ? ORDER BY `id` DESC LIMIT ?, ?") st.setInt(1, augment) st.setInt(2, limit1) st.setInt(3, limit2) elif me == 1: st=con.prepareStatement("SELECT id, itemId, enchant, augment, augLvl, price, money, ownerId, shadow FROM `z_stock_items` WHERE `ownerId` = ? ORDER BY `id` DESC LIMIT ?, ?") st.setInt(1, player.getObjectId()) st.setInt(2, limit1) st.setInt(3, limit2) else: st=con.prepareStatement("SELECT id, itemId, enchant, augment, augLvl, price, money, ownerId, shadow FROM `z_stock_items` ORDER BY `id` DESC LIMIT ?, ?") st.setInt(1, limit1) st.setInt(2, limit2) rs=st.executeQuery() while (rs.next()): sId = rs.getInt("id") itmId = rs.getInt("itemId") ownerId = rs.getInt("ownerId") brokeItem = ItemTable.getInstance().getTemplate(itmId) if brokeItem == None: continue должны браться из z_stock_items.sql взял данный файл с другой сборки вставил но как понимаю он не подходит. Люди добрые помогите создать правильный z_stock_items.sql или вообще ошибка в другом? Спасибо. Share this post Link to post Share on other sites
iEA 24 Posted July 5, 2017 а сборку нам начинать уже ванговать ? или как ? Название напиши сборки. Share this post Link to post Share on other sites
Forss 0 Posted July 5, 2017 а сборку нам начинать уже ванговать ? или как ? Название напиши сборки. l2jlovely Share this post Link to post Share on other sites
simbi0z 4 Posted July 5, 2017 (edited) delete Edited July 5, 2017 by simbi0z Share this post Link to post Share on other sites
simbi0z 4 Posted July 5, 2017 Попробуй этот https://yadi.sk/d/oms4oINy3KmBpJ Share this post Link to post Share on other sites
Forss 0 Posted July 5, 2017 Попробуй этот https://yadi.sk/d/oms4oINy3KmBpJ не работает та же ошибка Share this post Link to post Share on other sites
Forss 0 Posted July 5, 2017 И так эту ошибку убрал методом что поменял импорт с from ru.catssoftware.sql import DatabaseFactory на import ru.catssoftware.L2DatabaseFactory; Теперь когда подходишь к нпц и жмешь просмотр товара то выскакивает script error и вот какая ошибка в логих ГС [05.07.17 11:44:57] /home/game/data/scripts/custom/auction/__init__.py Traceback (innermost last): File "__init__.py", line 273, in onAdvEvent File "__init__.py", line 225, in showSellItems UnboundLocalError: local: 'rs' at org.python.core.Py.UnboundLocalError(Unknown Source) at org.python.core.PyFrame.getlocal(Unknown Source) at org.python.core.PyFrame.getlocal(Unknown Source) at org.python.pycode.serializable._pyx1499240598761.showSellItems$15(__init__.py:225) at org.python.pycode.serializable._pyx1499240598761.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.invoke(Unknown Source) at org.python.pycode.serializable._pyx1499240598761.onAdvEvent$18(__init__.py:273) at org.python.pycode.serializable._pyx1499240598761.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$328.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(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722) Подскажите с чем это связанно. Share this post Link to post Share on other sites
Forss 0 Posted July 5, 2017 Вот сам скрипт люди кто шарит помогите поправить. http://rgho.st/8mS7D2BZN Share this post Link to post Share on other sites
simbi0z 4 Posted July 6, 2017 Это аукцион?) Это аукцион. Share this post Link to post Share on other sites
vvvvv 0 Posted July 6, 2017 Тогда. Ясно у меня есть и работает, но отключил в целях безопасности и падения сервера Share this post Link to post Share on other sites