Modify

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#13934 closed defect (othersoftware)

script "qat_script.py" lässt sich nicht mehr starten

Reported by: letihu@… Owned by: coso
Priority: normal Milestone:
Component: Plugin scripting Version:
Keywords: template_report Cc:

Description

What steps will reproduce the problem?

  1. Nach dem Update lässt sich das script "qat_script.py" nicht mehr starten.

Alle Schritte wie bei http://wiki.openstreetmap.org/wiki/DE:Quality_Assurance_Tools_script/Installation wurden durchgeführt.


Notwendige JOSM-Plugins aktivieren und konfigurieren

Im JOSM-Menü: Bearbeiten -> Einstellungen... ->

-> Plugins, aktiviere die Plugins "scripting" und "jts".
-> Fernsteuerung, aktiviere die Fernsteuerung und wähle "Objekte in neue Ebene herunterladen" ab, wenn es aktiviert ist.

Klicke "OK" und starte JOSM neu.

Im JOSM-Menü: Bearbeiten -> Einstellungen... ->

-> script-engine.png Scripting -> (im ersten Tab) Script engines -> klicke auf die "Get Jython" Schaltfläche.
Hinweis: Es ist nicht notwendig weitere Einstellungen in diesen Tabs vorzunehmen.

Klicke "OK".

Lade die Datei qat_script.zip herunter und entpacke deren Inhalt in ein Verzeichnis mit dem Namen "qat_script".

Das Skript starten

Im JOSM-Menü Scripting -> Run... -> das Skript "qat_script.py" im qat_script-Verzeichnis auswählen.

Wenn danach gefragt wird, Python als Sprache auswählen.

Nach wenigen Sekunden erscheint automatisch ein neues Menü "QA Tools" im JOSM-Menü.

Beim nächsten Mal erscheint das Skript automatisch im "Scripting" Menü.


What is the expected result?

What happens instead?

Please provide any additional information below. Attach a screenshot if possible.

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2016-11-06 20:18:38 +0100 (Sun, 06 Nov 2016)
Build-Date:2016-11-06 21:45:03
Revision:11223
Relative:URL: ^/trunk

Identification: JOSM/1.5 (11223 de) Windows 7 64-Bit
Memory Usage: 486 MB / 910 MB (331 MB allocated, but free)
Java version: 1.8.0_111-b14, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: \Display0 1366x768
Maximum Screen Size: 1366x768

Plugins:
+ FixAddresses (32796)
+ jts (32699)
+ scripting (30761)

Last errors/warnings:
- W: Unable to get color from '' for color preference 'extrude.main.line'
- W: Unable to get color from '' for color preference 'improve.way.accuracy.helper.line'
- W: Unable to get color from '' for color preference 'make.parallel.helper.line'
- W: Old style SideButton usage for action org.openstreetmap.josm.plugins.scripting.ui.RunScriptDialog$RunAction@2f75fd08
- W: Old style SideButton usage for action org.openstreetmap.josm.plugins.scripting.ui.RunScriptDialog$CancelAction@78c37c52
- W: Old style SideButton usage for action org.openstreetmap.josm.gui.help.ContextSensitiveHelpAction@7d75c6cc
- E: Script Error - Script execution has failed.

Attachments (2)

Script.jpg (226.5 KB ) - added by letihu@… 8 years ago.
Script_ok.jpg (212.9 KB ) - added by letihu@… 8 years ago.
Mit der Version 10966 läuft es noch

Download all attachments as: .zip

Change History (9)

by letihu@…, 8 years ago

Attachment: Script.jpg added

by letihu@…, 8 years ago

Attachment: Script_ok.jpg added

Mit der Version 10966 läuft es noch

comment:1 by simon04, 8 years ago

Component: CorePlugin scripting
Owner: changed from team to coso

Running the qat_script script via the scripting plugin fails. Might be due to r10972.

Stack trace from the commandline:

javax.script.ScriptException: TypeError: addLayer(): expected 2 args; got 1 in <script> at line number 942
	at org.python.jsr223.PyScriptEngine.scriptException(PyScriptEngine.java:202)
	at org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:42)
	at org.python.jsr223.PyScriptEngine.access$300(PyScriptEngine.java:20)
	at org.python.jsr223.PyScriptEngine$PyCompiledScript.eval(PyScriptEngine.java:231)
	at javax.script.CompiledScript.eval(CompiledScript.java:106)
	at org.openstreetmap.josm.plugins.scripting.ui.ScriptExecutor.lambda$runScriptWithPluggedEngine$0(ScriptExecutor.java:265)
	at org.openstreetmap.josm.plugins.scripting.ui.ScriptExecutor.runOnSwingEDT(ScriptExecutor.java:212)
	at org.openstreetmap.josm.plugins.scripting.ui.ScriptExecutor.runScriptWithPluggedEngine(ScriptExecutor.java:278)
	at org.openstreetmap.josm.plugins.scripting.ui.RunScriptService.runScript(RunScriptService.java:180)
	at org.openstreetmap.josm.plugins.scripting.ui.RunScriptDialog$RunAction.actionPerformed(RunScriptDialog.java:202)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
	at java.awt.Component.processMouseEvent(Component.java:6533)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
	at java.awt.Component.processEvent(Component.java:6298)
	at java.awt.Container.processEvent(Container.java:2236)
	at java.awt.Component.dispatchEventImpl(Component.java:4889)
	at java.awt.Container.dispatchEventImpl(Container.java:2294)
	at java.awt.Component.dispatchEvent(Component.java:4711)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
	at java.awt.Container.dispatchEventImpl(Container.java:2280)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4711)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
	at java.awt.EventQueue$4.run(EventQueue.java:731)
	at java.awt.EventQueue$4.run(EventQueue.java:729)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
	at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
	at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
	at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
	at java.awt.Dialog.show(Dialog.java:1084)
	at java.awt.Component.show(Component.java:1671)
	at java.awt.Component.setVisible(Component.java:1623)
	at java.awt.Window.setVisible(Window.java:1014)
	at java.awt.Dialog.setVisible(Dialog.java:1005)
	at org.openstreetmap.josm.plugins.scripting.ui.RunScriptDialog.setVisible(RunScriptDialog.java:166)
	at org.openstreetmap.josm.plugins.scripting.ui.RunScriptAction.actionPerformed(RunScriptAction.java:33)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
	at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
	at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
	at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
	at java.awt.Component.processMouseEvent(Component.java:6533)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
	at java.awt.Component.processEvent(Component.java:6298)
	at java.awt.Container.processEvent(Container.java:2236)
	at java.awt.Component.dispatchEventImpl(Component.java:4889)
	at java.awt.Container.dispatchEventImpl(Container.java:2294)
	at java.awt.Component.dispatchEvent(Component.java:4711)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
	at java.awt.Container.dispatchEventImpl(Container.java:2280)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4711)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
	at java.awt.EventQueue$4.run(EventQueue.java:731)
	at java.awt.EventQueue$4.run(EventQueue.java:729)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: Traceback (most recent call last):
  File "<script>", line 942, in <module>
  File "<script>", line 187, in __init__
  File "<script>", line 250, in create_new_dataset_if_empty
TypeError: addLayer(): expected 2 args; got 1

	at org.python.core.Py.TypeError(Py.java:259)
	at org.python.core.PyReflectedFunction.throwError(PyReflectedFunction.java:209)
	at org.python.core.PyReflectedFunction.throwArgCountError(PyReflectedFunction.java:262)
	at org.python.core.PyReflectedFunction.throwError(PyReflectedFunction.java:319)
	at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:167)
	at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:204)
	at org.python.core.PyObject.__call__(PyObject.java:478)
	at org.python.core.PyObject.__call__(PyObject.java:482)
	at org.python.core.PyMethod.__call__(PyMethod.java:141)
	at org.python.pycode._pyx0.create_new_dataset_if_empty$8(<script>:254)
	at org.python.pycode._pyx0.call_function(<script>)
	at org.python.core.PyTableCode.call(PyTableCode.java:167)
	at org.python.core.PyBaseCode.call(PyBaseCode.java:138)
	at org.python.core.PyFunction.__call__(PyFunction.java:413)
	at org.python.core.PyMethod.__call__(PyMethod.java:126)
	at org.python.pycode._pyx0.__init__$5(<script>:226)
	at org.python.pycode._pyx0.call_function(<script>)
	at org.python.core.PyTableCode.call(PyTableCode.java:167)
	at org.python.core.PyBaseCode.call(PyBaseCode.java:307)
	at org.python.core.PyBaseCode.call(PyBaseCode.java:198)
	at org.python.core.PyFunction.__call__(PyFunction.java:482)
	at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:237)
	at org.python.core.PyMethod.__call__(PyMethod.java:228)
	at org.python.core.PyMethod.__call__(PyMethod.java:223)
	at org.python.core.Deriveds.dispatch__init__(Deriveds.java:19)
	at org.python.core.PyObjectDerived.dispatch__init__(PyObjectDerived.java:1112)
	at org.python.core.PyType.type___call__(PyType.java:1713)
	at org.python.core.PyType.__call__(PyType.java:1696)
	at org.python.core.PyObject.__call__(PyObject.java:445)
	at org.python.core.PyObject.__call__(PyObject.java:449)
	at org.python.pycode._pyx0.f$0(<script>:942)
	at org.python.pycode._pyx0.call_function(<script>)
	at org.python.core.PyTableCode.call(PyTableCode.java:167)
	at org.python.core.PyCode.call(PyCode.java:18)
	at org.python.core.Py.runCode(Py.java:1386)
	at org.python.core.__builtin__.eval(__builtin__.java:497)
	at org.python.core.__builtin__.eval(__builtin__.java:501)
	at org.python.util.PythonInterpreter.eval(PythonInterpreter.java:259)
	at org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:40)
	... 93 more

comment:2 by MKnight, 8 years ago

Kann ich so nicht bestätigen, läuft hier.
Allerdings werden die Marker nicht mehr angezeigt, siehe https://forum.openstreetmap.org/viewtopic.php?id=56380

works here, but markers are not shown anymore

comment:3 by salix01, 8 years ago

Script läuft erst nach der Aktivierung des Hintergrundbildes, allerdings mit Fehlermeldung und ohne Kartenmarker.
Ausführung direkt nach JOSM-Start funktioniert nicht.
Script is running after enabling the background imagery with error warning and without markers.
Script doesn't run direct starting after JOSM.

comment:4 by letihu@…, 8 years ago

Das die Kartenmarker fehlen ist wirklich nicht schön. Es fehlt somit die Übersicht.

comment:5 by simon04, 8 years ago

Resolution: othersoftware
Status: newclosed

The script is developed at https://github.com/simone-f/qat_script/. Please report any issues there. The stack trace from comment:1 is tracked as https://github.com/simone-f/qat_script/issues/10. For the other problems, please submit separate issues.

comment:6 by letihu@…, 8 years ago

Das ist ja jetzt einfach gelöst :-(
Die andere SW ist schuld, obwohl die Bugs erst mit der letzten neuen JOSM-Version entstanden sind.

Und was ist hiermit?
Script läuft erst nach der Aktivierung des Hintergrundbildes, allerdings mit Fehlermeldung und ohne Kartenmarker.
Ausführung direkt nach JOSM-Start funktioniert nicht.
Script is running after enabling the background imagery with error warning and without markers.
Script doesn't run direct starting after JOSM.

comment:7 by simon04, 8 years ago

Please keep things constructive. JOSM is an actively maintained software product which sometimes requires incompatible changes causing adaption work for plugins. According to DevelopersGuide/DevelopingPlugins#ManagingaplugininOSM.orgSVN, we try to keep an eye on known plugins, i.e., those in the OSM SVN or JOSM GitHub repositories.

For the mentioned qat_script issues, please report them in an organized fashion at https://github.com/simone-f/qat_script/ and motivate the author to look at them.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain coso.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.