Skip to content

How to run pylib test smlib_smlib_testOpenUDBDS.py in Linux

JoyKing edited this page Jul 29, 2014 · 2 revisions

The script opens the UDB file named "smlib_worldpy.udb" and list the dataset names in command window. Tips below:

1.First of all, make sure that python 2.7.3 is installed and in use. For other versions of python we did not make full test and may cause unexpected problems.

2.Set the charset to GB18030 in command window, or some information printed is not readable. (The problem will be fixed in next version in /GIScript/lib/). If the system has not installed the charset (command [$ local -a] to check ), do as follows(get the Ubuntu system for example):

  • Install software

$ sudo apt-get install zh-autoconvert

$ sudo apt-get install zhcon

  • Make configure

$ vi /var/lib/locales/supported.d/local

zh_CN.GBK GBK

zh_CN.GB18030 GB18030

$ sudo local-gen

  • Command windows setting

Add the charset GB18030 to the menu of the command window and select it.

3.Add ugc dll path to LD_LIBRARY_PATH, eg. Export LD_LIBRARY_PATH=\GIScript\lib\7.1\Linux64\ugc_710_64_x64_linux_gcc_Bin:$LD_LIBRARY_PATH, or the script will be failed to load smu.so and get the error as "can't load smDataSuExchange.so"

The document of GIScript

Clone this wiki locally