gvSIG bugs #4748
Can't execute autorun from Catalog v. 1.0.0-10
Status: | Closed | % Done: | 0% | |
---|---|---|---|---|
Priority: | Normal | Spent time: | - | |
Assignee: | ||||
Category: | Scripting | |||
Target version: | 2.4.0-2843 (rev. org.gvsig.desktop-2.0.???) | |||
Severity: | Minor | Add-on version: | ||
gvSIG version: | 2.4.0 | Add-on build: | ||
gvSIG build: | Add-on resolve version: | |||
Operative System: | Add-on resolve build: | |||
Keywords: | Proyecto: | |||
Has patch: | Hito: | |||
Add-on name: | Unknown |
Description
After installing Catalog and restarting gvSIG, the Catalog autorun can't be executed because 'C:\\Program Files\\home\\Antonio' folder doesn't exist:
WARN 54728 Thread-10 org.gvsig.scripting.app.extension.ScriptingExtension$ExecuteAutorunScripts - Can't execute autorun from 'C:\Users\Antonio\gvSIG\plugins\org.gvsig.scripting.app.mainplugin\2.4.0\scripts\addons\Catalog\autorun.inf'. org.gvsig.scripting.ExecuteErrorException: OSError: [Errno 20] Not a directory: 'C:\\Program Files\\home\\Antonio' in <script> at line number 8 at org.gvsig.scripting.impl.DefaultScriptingScript.invokeFunction(DefaultScriptingScript.java:551) at org.gvsig.scripting.impl.DefaultScriptingScript.run(DefaultScriptingScript.java:521) at org.gvsig.scripting.impl.DefaultScriptingScript.run(DefaultScriptingScript.java:508) at org.gvsig.scripting.app.extension.ScriptingExtension$ExecuteAutorunScripts.run(ScriptingExtension.java:563) at java.lang.Thread.run(Unknown Source) Caused by: javax.script.ScriptException: OSError: [Errno 20] Not a directory: 'C:\\Program Files\\home\\Antonio' in <script> at line number 8 at org.python.jsr223.MyPyScriptEngine.scriptException(MyPyScriptEngine.java:209) at org.python.jsr223.MyPyScriptEngine.invokeFunction(MyPyScriptEngine.java:138) at org.gvsig.scripting.impl.DefaultScriptingScript.invokeFunction(DefaultScriptingScript.java:533) ... 4 more Caused by: Traceback (most recent call last): File "<script>", line 8, in main File "C:\Users\Antonio\gvSIG\plugins\org.gvsig.scripting.app.mainplugin\2.4.0\scripts\addons\Catalog\actions.py", line 124, in selfRegister viewInformationArea.add( File "C:\Users\Antonio\gvSIG\plugins\org.gvsig.scripting.app.mainplugin\2.4.0\scripts\addons\Catalog\catalog.py", line 78, in __init__ self.__catalog = Catalog(self) File "C:\Users\Antonio\gvSIG\plugins\org.gvsig.scripting.app.mainplugin\2.4.0\scripts\addons\Catalog\catalog.py", line 38, in __init__ self.add(Folders(self)) File "C:\Users\Antonio\gvSIG\plugins\org.gvsig.scripting.app.mainplugin\2.4.0\scripts\addons\Catalog\folders.py", line 46, in __init__ self.add(HomeFolder(self)) File "C:\Users\Antonio\gvSIG\plugins\org.gvsig.scripting.app.mainplugin\2.4.0\scripts\addons\Catalog\folders.py", line 254, in __init__ FolderNode.__init__(self, parent, File "C:\Users\Antonio\gvSIG\plugins\org.gvsig.scripting.app.mainplugin\2.4.0\scripts\addons\Catalog\folders.py", line 104, in __init__ ls = os.listdir(self.__path) OSError: [Errno 20] Not a directory: 'C:\\Program Files\\home\\Antonio' at org.python.core.Py.OSError(Py.java:164) at org.python.modules.posix.PosixModule.listdir(PosixModule.java:673) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:188) at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:206) at org.python.core.PyObject.__call__(PyObject.java:480) at org.python.core.PyObject.__call__(PyObject.java:484) at addons.Catalog.folders$py.__init__$8(C:/Users/Antonio/gvSIG/plugins/org.gvsig.scripting.app.mainplugin/2.4.0/scripts/addons/Catalog/folders.py:117) at addons.Catalog.folders$py.call_function(C:/Users/Antonio/gvSIG/plugins/org.gvsig.scripting.app.mainplugin/2.4.0/scripts/addons/Catalog/folders.py) at org.python.core.PyTableCode.call(PyTableCode.java:171) at org.python.core.PyBaseCode.call(PyBaseCode.java:308) at org.python.core.PyFunction.function___call__(PyFunction.java:471) at org.python.core.PyFunction.__call__(PyFunction.java:466) at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:235) at org.python.core.PyMethod.__call__(PyMethod.java:228) at addons.Catalog.folders$py.__init__$30(C:/Users/Antonio/gvSIG/plugins/org.gvsig.scripting.app.mainplugin/2.4.0/scripts/addons/Catalog/folders.py:254) at addons.Catalog.folders$py.call_function(C:/Users/Antonio/gvSIG/plugins/org.gvsig.scripting.app.mainplugin/2.4.0/scripts/addons/Catalog/folders.py) at org.python.core.PyTableCode.call(PyTableCode.java:171) at org.python.core.PyBaseCode.call(PyBaseCode.java:308) at org.python.core.PyBaseCode.call(PyBaseCode.java:199) 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:1822) at org.python.core.PyType.__call__(PyType.java:1805) at org.python.core.PyObject.__call__(PyObject.java:480) at org.python.core.PyObject.__call__(PyObject.java:484) at addons.Catalog.folders$py.__init__$3(C:/Users/Antonio/gvSIG/plugins/org.gvsig.scripting.app.mainplugin/2.4.0/scripts/addons/Catalog/folders.py:54) at addons.Catalog.folders$py.call_function(C:/Users/Antonio/gvSIG/plugins/org.gvsig.scripting.app.mainplugin/2.4.0/scripts/addons/Catalog/folders.py) at org.python.core.PyTableCode.call(PyTableCode.java:171) at org.python.core.PyBaseCode.call(PyBaseCode.java:308) at org.python.core.PyBaseCode.call(PyBaseCode.java:199) 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:1822) at org.python.core.PyType.__call__(PyType.java:1805) at org.python.core.PyObject.__call__(PyObject.java:480) at org.python.core.PyObject.__call__(PyObject.java:484) at addons.Catalog.catalog$py.__init__$2(C:/Users/Antonio/gvSIG/plugins/org.gvsig.scripting.app.mainplugin/2.4.0/scripts/addons/Catalog/catalog.py:39) at addons.Catalog.catalog$py.call_function(C:/Users/Antonio/gvSIG/plugins/org.gvsig.scripting.app.mainplugin/2.4.0/scripts/addons/Catalog/catalog.py) at org.python.core.PyTableCode.call(PyTableCode.java:171) at org.python.core.PyBaseCode.call(PyBaseCode.java:308) at org.python.core.PyBaseCode.call(PyBaseCode.java:199) 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:1822) at org.python.core.PyType.__call__(PyType.java:1805) at org.python.core.PyObject.__call__(PyObject.java:480) at org.python.core.PyObject.__call__(PyObject.java:484) at addons.Catalog.catalog$py.__init__$13(C:/Users/Antonio/gvSIG/plugins/org.gvsig.scripting.app.mainplugin/2.4.0/scripts/addons/Catalog/catalog.py:86) at addons.Catalog.catalog$py.call_function(C:/Users/Antonio/gvSIG/plugins/org.gvsig.scripting.app.mainplugin/2.4.0/scripts/addons/Catalog/catalog.py) at org.python.core.PyTableCode.call(PyTableCode.java:171) at org.python.core.PyBaseCode.call(PyBaseCode.java:308) at org.python.core.PyBaseCode.call(PyBaseCode.java:199) 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:1822) at org.python.core.PyType.__call__(PyType.java:1805) at org.python.core.PyObject.__call__(PyObject.java:464) at org.python.core.PyObject.__call__(PyObject.java:468) at addons.Catalog.actions$py.selfRegister$11(C:/Users/Antonio/gvSIG/plugins/org.gvsig.scripting.app.mainplugin/2.4.0/scripts/addons/Catalog/actions.py:124) at addons.Catalog.actions$py.call_function(C:/Users/Antonio/gvSIG/plugins/org.gvsig.scripting.app.mainplugin/2.4.0/scripts/addons/Catalog/actions.py) at org.python.core.PyTableCode.call(PyTableCode.java:171) at org.python.core.PyBaseCode.call(PyBaseCode.java:125) at org.python.core.PyFunction.__call__(PyFunction.java:403) at org.python.pycode._pyx9.main$1(<script>:8) at org.python.pycode._pyx9.call_function(<script>) at org.python.core.PyTableCode.call(PyTableCode.java:171) at org.python.core.PyBaseCode.call(PyBaseCode.java:308) at org.python.core.PyFunction.function___call__(PyFunction.java:471) at org.python.core.PyFunction.__call__(PyFunction.java:466) at org.python.core.PyFunction.__call__(PyFunction.java:456) at org.python.jsr223.MyPyScriptEngine.invokeFunction(MyPyScriptEngine.java:132) ... 5 more
Related issues
Associated revisions
refs #4748.modificado el gvSIG.sh para que inicialice la variable HOME correctamente independientemente de la plataforma en que se ejecute.
History
#1
Updated by Joaquín del Cerro Murciano over 6 years ago
- gvSIG build deleted (
2843) - Target version changed from 2.4.0-2850-final (rev. org.gvsig.desktop-2.0.220) to 2.4.0-2843 (rev. org.gvsig.desktop-2.0.???)
- Assignee set to Joaquín del Cerro Murciano
- Status changed from New to Fixed
Al parecer en windows no se estaba obteniendo la carpeta del usuario correctamente, ya que la variable HOME no apunta al la carpeta del usuario en windows.
He camiado el
os.getenv("HOME")
por
os.path.expanduser('~')
Que parece que es la forma correcta de obtener el HOME en python.
De paso he hechho que no falle si no puede obtener el listado de ficheros de una carpeta.
#2
Updated by Antonio Falciano over 6 years ago
- Target version changed from 2.4.0-2843 (rev. org.gvsig.desktop-2.0.???) to 2.4.0-2850-final (rev. org.gvsig.desktop-2.0.220)
- Status changed from Fixed to New
Both
os.getenv("HOME")and
os.path.expanduser('~')returns 'C:\Program Files\home\Antonio' in the Jython console. Instead,
os.getenv("USERPROFILE")works fine.
#3
Updated by Antonio Falciano over 6 years ago
- Status changed from New to Closed
Because the autorun is executed this time, I close this ticket.
The issue about user folder in Windows affects only the "User folder" node in Catalog v. 1.0.0-11 in Windows.
#4
Updated by Antonio Falciano over 6 years ago
- Target version changed from 2.4.0-2850-final (rev. org.gvsig.desktop-2.0.220) to 2.4.0-2843 (rev. org.gvsig.desktop-2.0.???)
#5
Updated by Joaquín del Cerro Murciano over 6 years ago
- Related to gvSIG bugs #4754: The "User folder" node in Catalog v. 1.0.0-11 is not working in Windows added