[GRASS-dev] Calling GRASS from outside: cannot open shared object file

Markus Neteler neteler at osgeo.org
Tue May 13 09:36:25 PDT 2014


Hi,

I tried my current start-python-and-create-a-location script on Windows.
The location is generated but then a call of the scripting library fails
with a gettext error (I print the os.environment to understand more but no
idea):


Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)]
on win32
Type "help", "copyright", "credits" or "license" for more information.

Imported NumPy 1.8.0, SciPy 0.13.3, Matplotlib 1.3.1
runfile('C:/Users/VPCF2/Desktop/STEM/grass7_python/start_grass7_create_new_location_ADVANCED
(1).py', wdir=r'C:/Users/VPCF2/Desktop/STEM/grass7_python')
+ guidata 1.6.1, guiqwt 2.3.1
Type "scientific" for more details.
>>> Created location
c:\users\vpcf2\appdata\local\temp\grassdata\389cf64663f4d727d9ca9864e2e6de64
{'TMP': 'C:\\Users\\VPCF2\\AppData\\Local\\Temp', 'COMPUTERNAME':
'VPCF2-VAIO', 'SPYDER_PARENT_DIR': 'C:\\Python27\\lib\\site-packages',
'ETS_TOOLKIT': 'qt4', 'USERDOMAIN': 'VPCF2-VAIO', 'QT_API': 'pyqt',
'EMC_AUTOPLAY': 'C:\\Program Files (x86)\\Common Files\\Roxio Shared\\',
'PSMODULEPATH':
'C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\',
'COMMONPROGRAMFILES': 'C:\\Program Files (x86)\\Common Files',
'PROCESSOR_IDENTIFIER': 'Intel64 Family 6 Model 42 Stepping 7,
GenuineIntel', 'IGNORE_SIP_SETAPI_ERRORS': 'False', 'PROGRAMFILES':
'C:\\Program Files (x86)', 'PROCESSOR_REVISION': '2a07', 'SYSTEMROOT':
'C:\\Windows', 'PATH': 'C:\\Python27\\Lib\\site-packages\\PyQt4;C:\\Program
Files\\ImageMagick-6.8.6-Q16;C:\\Program Files (x86)\\NVIDIA
Corporation\\PhysX\\Common;C:\\Program Files\\Common Files\\Microsoft
Shared\\Windows Live;C:\\Program Files (x86)\\Common Files\\Microsoft
Shared\\Windows
Live;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program
Files\\WIDCOMM\\Bluetooth Software\\;C:\\Program Files\\WIDCOMM\\Bluetooth
Software\\syswow64;\\;C:\\Program Files (x86)\\Sony\\VAIO Startup Setting
Tool;C:\\Program Files (x86)\\Common Files\\Roxio
Shared\\10.0\\DLLShared\\;C:\\Program Files (x86)\\Common Files\\Roxio
Shared\\DLLShared\\;C:\\Program Files (x86)\\Windows
Live\\Shared;C:\\Python27;C:\\Python27\\DLLs;C:\\Python27\\Scripts;C:\\Python27\\gnuplot\\binary;C:\\Program
Files (x86)\\pythonxy\\SciTE-3.3.2-3;C:\\Program Files
(x86)\\pythonxy\\console;C:\\MinGW32-xy\\bin', 'ROXIOCENTRAL': 'C:\\Program
Files (x86)\\Common Files\\Roxio Shared\\10.0\\Roxio Central36\\',
'PROGRAMFILES(X86)': 'C:\\Program Files (x86)', 'COMSPEC':
'C:\\Windows\\system32\\cmd.exe', 'LANG': 'en_US', 'TK_LIBRARY':
'C:\\Python27\\tcl\\tk8.5', 'CONFIGSETROOT': 'C:\\Windows\\ConfigSetRoot',
'UMD_NAMELIST': 'guidata,guiqwt', 'TEMP':
'C:\\Users\\VPCF2\\AppData\\Local\\Temp', 'UMD_VERBOSE': 'True',
'PROCESSOR_ARCHITECTURE': 'x86', 'LD_LIBRARY_PATH':
'C:\\OSGeo4W\\apps\\grass\\grass-7.1.svn\\lib', 'TIX_LIBRARY':
'C:\\Python27\\tcl\\tix8.4.3', 'ALLUSERSPROFILE': 'C:\\ProgramData',
'LOCALE': 'C', 'MATPLOTLIB_BACKEND': 'Qt4Agg', 'SESSIONNAME': 'Console',
'HOMEPATH': '\\Users\\VPCF2', 'PROGRAMW6432': 'C:\\Program Files',
'USERNAME': 'VPCF2', 'SPYDER_AR_STATE': 'True', 'LOGONSERVER':
'\\\\VPCF2-VAIO', 'LOCALAPPDATA': 'C:\\Users\\VPCF2\\AppData\\Local',
'PROGRAMDATA': 'C:\\ProgramData', 'PYTHONPATH':
'C:\\Users\\VPCF2\\.qgis2\\processing;C:\\OSGeo4W\\apps\\grass\\grass-7.1.svn\\scripts',
'SPYDER_N_PORT': '20129', 'SPYDER_SHELL_ID': '146823976', 'TCL_LIBRARY':
'C:\\Python27\\tcl\\tcl8.5', 'PUBLIC': 'C:\\Users\\Public', 'PATHEXT':
'.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW',
'UMD_ENABLED': 'True', 'MATPLOTLIB_PATCH': 'None', 'FP_NO_HOST_CHECK':
'NO', 'WINDIR': 'C:\\Windows', 'GISDBASE':
'c:\\users\\vpcf2\\appdata\\local\\temp\\grassdata', 'IPYTHON_KERNEL':
'False', 'SPYDER_AR_TIMEOUT': '2000', 'HOMEDRIVE': 'C:',
'INSTALL_QT_INPUTHOOK': 'True', 'PYTHONSTARTUP':
'C:\\Python27\\lib\\site-packages\\spyderlib\\scientific_startup.py',
'SYSTEMDRIVE': 'C:', 'COLORIZE_SYS_STDERR': 'False',
'NUMBER_OF_PROCESSORS': '8', 'APPDATA':
'C:\\Users\\VPCF2\\AppData\\Roaming', 'SPYDER_I_PORT': '20128',
'PROCESSOR_LEVEL': '6', 'SPYDER_ENCODING': 'cp1252',
'PROCESSOR_ARCHITEW6432': 'AMD64', 'GRASS_SH':
'C:\\OSGeo4W\\apps\\grass\\grass-7.1.svn\\msys\\bin\\sh.exe',
'COMMONPROGRAMW6432': 'C:\\Program Files\\Common Files', 'OS':
'Windows_NT', 'COMMONPROGRAMFILES(X86)': 'C:\\Program Files (x86)\\Common
Files', 'USERPROFILE': 'C:\\Users\\VPCF2'}
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File
"C:\Python27\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py",
line 540, in runfile
    execfile(filename, namespace)
  File
"C:/Users/VPCF2/Desktop/STEM/grass7_python/start_grass7_create_new_location_ADVANCED
(1).py", line 127, in <module>
    import grass.script as grass
  File
"C:\OSGeo4W\apps\grass\grass-7.1.svn\etc\python\grass\script\__init__.py",
line 1, in <module>
    from core   import *
  File
"C:\OSGeo4W\apps\grass\grass-7.1.svn\etc\python\grass\script\core.py", line
38, in <module>
    gettext.install('grasslibs', os.path.join(os.getenv("GISBASE"),
'locale'))
  File "C:\Python27\lib\ntpath.py", line 96, in join
    assert len(path) > 0
TypeError: object of type 'NoneType' has no len()
>>>

Any suggestions? This is using OSGeo4W 32bit.

thanks
Markus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20140513/480206a8/attachment-0001.html>


More information about the grass-dev mailing list