Subject: Marine Geospatial Ecology Tools (MGET) help
Text archives
| From: | "Jason Roberts" <> |
|---|---|
| To: | "'MURASE, Hiroto'" <> |
| Cc: | <> |
| Subject: | RE: [mget-help] Abunt "Create Vectors for AVISO geostrophic current product" |
| Date: | Thu, 26 Dec 2013 08:32:24 -0500 |
Dear Hiroto,
I am sorry about this problem. I should be able to help you fix it.
In this particular case, it is not a character set issue. This message:
ImportError: No module named _GeoEcoArcGISHelper
usually means that there is an installation problem with either Python or
MGET. The most frequent causes are: 1) manually installing a second copy of
Python after installing ArcGIS, 2) Python related problems after upgrading
from one version of ArcGIS to another.
To help me understand what has happend, please run the attached script and
send me the output:
1. Save the script to someplace, such as your desktop.
2. Run it by double clicking it. A blank window will come up for a short
time and then disappear.
3. The script will create a file with the name GetMoreInformation.txt in the
same location as the script itself. Please send me that txt file.
Best regards,
Jason
-----Original Message-----
From: MURASE, Hiroto
[mailto:]
Sent: Tuesday, December 24, 2013 3:01 AM
To:
Subject: [mget-help] Abunt "Create Vectors for AVISO geostrophic current
product"
Dear Sirs,
This is the first time for me to use the MGET.
I tried to use "Create Vectors for AVISO geostrophic current product".
However, I encountered following error message.
-----
Traceback (most recent call last):
File "C:\Program
Files\GeoEco\ArcGISToolbox\Scripts\AvisoGriddedGeostrophicCurrentsCreateVect
orsAsArcGISFeatureClasses.py", line 1, in <module>
import sys, _GeoEcoArcGISHelper
ImportError: No module named _GeoEcoArcGISHelper
-----
I use the MGET 0.8a42 with ArcGIS 10.1 SP1 in Japanese environment.
Japanese is a double-byte character set and it might be one of the reason
why I can not use MGET in Japanese environment. I encountered similar
problem when I tried to use other tools.
Do you have any idea to solve the problem?
Regards,
------------------------------
Hiroto Murase (Ph. D)
Cetacean Resources Group
Oceanic Resources Division
National Research Institute of Far Seas Fisheries Fisheries Research Agency
2-12-4 Fukuura, Kanazawa, Yokohama, Kanagawa
236-8648
Japan
Phone: +81 45 788 7514
Fax: +81 45 788 5004
import os, sys, glob, traceback
outputTextFile = os.path.join(os.path.dirname(__file__),
os.path.splitext(os.path.basename(__file__))[0] + '.txt')
f = open(outputTextFile, 'w')
f.write(__file__ + '\n')
f.write(sys.executable + '\n')
sitePackagesDir = os.path.join(os.path.dirname(sys.executable), 'Lib',
'site-packages')
f.write(sitePackagesDir + ' : ' + repr(os.path.isdir(sitePackagesDir)) + '\n')
f.write(os.path.join(sitePackagesDir, '_GeoEcoArcGISHelper.pyd') + ' : ' +
repr(os.path.isdir(os.path.join(sitePackagesDir, '_GeoEcoArcGISHelper.pyd')))
+ '\n')
f.write(os.path.join(sitePackagesDir, 'GeoEco') + ' : ' +
repr(os.path.isdir(os.path.join(sitePackagesDir, 'GeoEco'))) + '\n')
f.write(sys.version + '\n')
f.write(repr(glob.glob('C:\\*')) + '\n')
if os.path.isdir(sitePackagesDir):
f.write('\n')
f.write(repr(glob.glob(sitePackagesDir + '\\*')) + '\n')
installedFromFile = 'C:\\Program
Files\\GeoEco\\ArcGISToolbox\\InstalledFrom.txt'
installedFromX86File = 'C:\\Program Files
(x86)\\GeoEco\\ArcGISToolbox\\InstalledFrom.txt'
f.write('\n')
f.write(os.path.dirname(installedFromFile) + ' : ' +
repr(os.path.isdir(os.path.dirname(installedFromFile))) + '\n')
f.write(installedFromFile + ' : ' + repr(os.path.isfile(installedFromFile)) +
'\n')
if os.path.isfile(installedFromFile):
try:
f2 = file(installedFromFile, 'rU')
f.write(f2.read())
f2.close()
except:
pass
f.write('\n')
f.write(os.path.dirname(installedFromX86File) + ' : ' +
repr(os.path.isfile(os.path.dirname(installedFromX86File))) + '\n')
f.write(installedFromX86File + ' : ' +
repr(os.path.isfile(installedFromX86File)) + '\n')
if os.path.isfile(installedFromX86File):
try:
f2 = file(installedFromX86File, 'rU')
f.write(f2.read())
f2.close()
except:
pass
f.write('\n')
f.write('Trying to import _GeoEcoArcGISHelper\n')
try:
import _GeoEcoArcGISHelper
except:
traceback.print_exc(file=f)
else:
f.write('Successfully imported _GeoEcoArcGISHelper from %s\n' %
sys.modules['_GeoEcoArcGISHelper'].__file__)
f.write('\n')
f.write('Trying to import _winreg\n')
try:
import _winreg
except:
traceback.print_exc(file=f)
else:
def GetRegistryValue(f, hkey, hkeyStr, subkey, valueName=None):
if valueName is None:
f.write('Trying to get the value of %s\\%s\n' % (hkeyStr, subkey))
else:
f.write('Trying to get the %s value of %s\\%s\n' % (valueName,
hkeyStr, subkey))
try:
h = _winreg.OpenKey(hkey, subkey)
try:
try:
if valueName is None:
value = _winreg.QueryValue(h, None)
else:
value = _winreg.QueryValueEx(h, valueName)[0]
except:
traceback.print_exc(file=f)
else:
f.write('The value was: %r\n' % value)
finally:
_winreg.CloseKey(h)
except:
traceback.print_exc(file=f)
GetRegistryValue(f, _winreg.HKEY_CLASSES_ROOT, 'HKEY_CLASSES_ROOT',
'Python.CompiledFile\\shell\\open\\command')
GetRegistryValue(f, _winreg.HKEY_CLASSES_ROOT, 'HKEY_CLASSES_ROOT',
'Python.File\\shell\\open\\command')
GetRegistryValue(f, _winreg.HKEY_LOCAL_MACHINE, 'HKEY_LOCAL_MACHINE',
'SOFTWARE\\Classes\\Python.CompiledFile\\shell\\open\\command')
GetRegistryValue(f, _winreg.HKEY_LOCAL_MACHINE, 'HKEY_LOCAL_MACHINE',
'SOFTWARE\\Classes\\Python.File\\shell\\open\\command')
f.write('\n')
GetRegistryValue(f, _winreg.HKEY_LOCAL_MACHINE, 'HKEY_LOCAL_MACHINE',
'SOFTWARE\\R-core\\R32', 'Current Version')
GetRegistryValue(f, _winreg.HKEY_LOCAL_MACHINE, 'HKEY_LOCAL_MACHINE',
'SOFTWARE\\R-core\\R32', 'InstallPath')
GetRegistryValue(f, _winreg.HKEY_LOCAL_MACHINE, 'HKEY_LOCAL_MACHINE',
'SOFTWARE\\R-core\\R', 'Current Version')
GetRegistryValue(f, _winreg.HKEY_LOCAL_MACHINE, 'HKEY_LOCAL_MACHINE',
'SOFTWARE\\R-core\\R', 'InstallPath')
f.write('\n')
f.write('Trying to import GeoEco.OceanographicAnalysis.Fronts\n')
try:
import GeoEco.OceanographicAnalysis.Fronts
except:
traceback.print_exc(file=f)
else:
f.write('Successfully imported GeoEco.OceanographicAnalysis.Fronts from
%s\n' % sys.modules['GeoEco.OceanographicAnalysis.Fronts'].__file__)
cleanFrontsFile =
os.path.join(os.path.dirname(sys.modules['GeoEco.OceanographicAnalysis.Fronts'].__file__),
'CleanFronts.py')
if os.path.exists(cleanFrontsFile):
f.write('%s exists\n' % cleanFrontsFile)
f.write('Trying to import win32api\n')
try:
import win32api
except:
traceback.print_exc(file=f)
else:
f.write('Calling win32api.FindExecutable on %s\n' %
cleanFrontsFile)
try:
executable = win32api.FindExecutable(cleanFrontsFile,
cleanFrontsFile)[1]
except:
traceback.print_exc(file=f)
else:
f.write('win32api.FindExecutable returned %s\n' % executable)
else:
f.write('%s DOES NOT EXIST' % cleanFrontsFile)
f.write('\n')
f.write('Initializing MGET logging\n')
f.close()
loggingIniContents = u"""
[handlers]
keys=LogFile
[handler_LogFile]
class=FileHandler
formatter=LogFile
args=(u'""" + outputTextFile + """',)
[formatters]
keys=LogFile
[formatter_LogFile]
format=%(asctime)s %(levelname)s %(message)s
[loggers]
keys=root,GeoEco,ArcGIS,COM,DatabaseAccess,Datasets,R
[logger_GeoEco]
level=DEBUG
handlers=LogFile
propagate=0
qualname=GeoEco
[logger_ArcGIS]
level=DEBUG
handlers=LogFile
propagate=0
qualname=GeoEco.ArcGIS
[logger_COM]
level=DEBUG
handlers=LogFile
propagate=0
qualname=GeoEco.COM
[logger_DatabaseAccess]
level=DEBUG
handlers=LogFile
propagate=0
qualname=GeoEco.DatabaseAccess
[logger_Datasets]
level=DEBUG
handlers=LogFile
propagate=0
qualname=GeoEco.Datasets
[logger_R]
level=DEBUG
handlers=LogFile
propagate=0
qualname=GeoEco.R
[logger_root]
level=DEBUG
handlers=LogFile
"""
loggingIniPath = os.path.join(os.path.dirname(__file__),
os.path.splitext(os.path.basename(__file__))[0] + '_Logging.ini')
fLoggingIni = open(loggingIniPath, 'w')
try:
fLoggingIni.write(loggingIniContents)
finally:
fLoggingIni.close()
try:
from GeoEco.Logging import Logger
Logger.Initialize(loggingConfigFile=unicode(loggingIniPath))
finally:
os.remove(loggingIniPath)
Logger.Info('Trying to access R')
try:
from GeoEco.R import R, RDependency
d = RDependency(2, 5, 0)
d.Initialize()
r = R.GetInterpreter()
Logger.Info('Trying 1+1 with R.')
r('print(1+1)')
except:
Logger.LogExceptionAsError()
f.close()
#raw_input()
I am sorry about this problem. I should be able to help you fix it.
In this particular case, it is not a character set issue. This message:
ImportError: No module named _GeoEcoArcGISHelper
usually means that there is an installation problem with either Python or
MGET. The most frequent causes are: 1) manually installing a second copy of
Python after installing ArcGIS, 2) Python related problems after upgrading
from one version of ArcGIS to another.
To help me understand what has happend, please run the attached script and
send me the output:
1. Save the script to someplace, such as your desktop.
2. Run it by double clicking it. A blank window will come up for a short
time and then disappear.
3. The script will create a file with the name GetMoreInformation.txt in the
same location as the script itself. Please send me that txt file.
Best regards,
Jason
-----Original Message-----
From: MURASE, Hiroto
[mailto:]
Sent: Tuesday, December 24, 2013 3:01 AM
To:
Subject: [mget-help] Abunt "Create Vectors for AVISO geostrophic current
product"
Dear Sirs,
This is the first time for me to use the MGET.
I tried to use "Create Vectors for AVISO geostrophic current product".
However, I encountered following error message.
-----
Traceback (most recent call last):
File "C:\Program
Files\GeoEco\ArcGISToolbox\Scripts\AvisoGriddedGeostrophicCurrentsCreateVect
orsAsArcGISFeatureClasses.py", line 1, in <module>
import sys, _GeoEcoArcGISHelper
ImportError: No module named _GeoEcoArcGISHelper
-----
I use the MGET 0.8a42 with ArcGIS 10.1 SP1 in Japanese environment.
Japanese is a double-byte character set and it might be one of the reason
why I can not use MGET in Japanese environment. I encountered similar
problem when I tried to use other tools.
Do you have any idea to solve the problem?
Regards,
------------------------------
Hiroto Murase (Ph. D)
Cetacean Resources Group
Oceanic Resources Division
National Research Institute of Far Seas Fisheries Fisheries Research Agency
2-12-4 Fukuura, Kanazawa, Yokohama, Kanagawa
236-8648
Japan
Phone: +81 45 788 7514
Fax: +81 45 788 5004
import os, sys, glob, traceback
outputTextFile = os.path.join(os.path.dirname(__file__),
os.path.splitext(os.path.basename(__file__))[0] + '.txt')
f = open(outputTextFile, 'w')
f.write(__file__ + '\n')
f.write(sys.executable + '\n')
sitePackagesDir = os.path.join(os.path.dirname(sys.executable), 'Lib',
'site-packages')
f.write(sitePackagesDir + ' : ' + repr(os.path.isdir(sitePackagesDir)) + '\n')
f.write(os.path.join(sitePackagesDir, '_GeoEcoArcGISHelper.pyd') + ' : ' +
repr(os.path.isdir(os.path.join(sitePackagesDir, '_GeoEcoArcGISHelper.pyd')))
+ '\n')
f.write(os.path.join(sitePackagesDir, 'GeoEco') + ' : ' +
repr(os.path.isdir(os.path.join(sitePackagesDir, 'GeoEco'))) + '\n')
f.write(sys.version + '\n')
f.write(repr(glob.glob('C:\\*')) + '\n')
if os.path.isdir(sitePackagesDir):
f.write('\n')
f.write(repr(glob.glob(sitePackagesDir + '\\*')) + '\n')
installedFromFile = 'C:\\Program
Files\\GeoEco\\ArcGISToolbox\\InstalledFrom.txt'
installedFromX86File = 'C:\\Program Files
(x86)\\GeoEco\\ArcGISToolbox\\InstalledFrom.txt'
f.write('\n')
f.write(os.path.dirname(installedFromFile) + ' : ' +
repr(os.path.isdir(os.path.dirname(installedFromFile))) + '\n')
f.write(installedFromFile + ' : ' + repr(os.path.isfile(installedFromFile)) +
'\n')
if os.path.isfile(installedFromFile):
try:
f2 = file(installedFromFile, 'rU')
f.write(f2.read())
f2.close()
except:
pass
f.write('\n')
f.write(os.path.dirname(installedFromX86File) + ' : ' +
repr(os.path.isfile(os.path.dirname(installedFromX86File))) + '\n')
f.write(installedFromX86File + ' : ' +
repr(os.path.isfile(installedFromX86File)) + '\n')
if os.path.isfile(installedFromX86File):
try:
f2 = file(installedFromX86File, 'rU')
f.write(f2.read())
f2.close()
except:
pass
f.write('\n')
f.write('Trying to import _GeoEcoArcGISHelper\n')
try:
import _GeoEcoArcGISHelper
except:
traceback.print_exc(file=f)
else:
f.write('Successfully imported _GeoEcoArcGISHelper from %s\n' %
sys.modules['_GeoEcoArcGISHelper'].__file__)
f.write('\n')
f.write('Trying to import _winreg\n')
try:
import _winreg
except:
traceback.print_exc(file=f)
else:
def GetRegistryValue(f, hkey, hkeyStr, subkey, valueName=None):
if valueName is None:
f.write('Trying to get the value of %s\\%s\n' % (hkeyStr, subkey))
else:
f.write('Trying to get the %s value of %s\\%s\n' % (valueName,
hkeyStr, subkey))
try:
h = _winreg.OpenKey(hkey, subkey)
try:
try:
if valueName is None:
value = _winreg.QueryValue(h, None)
else:
value = _winreg.QueryValueEx(h, valueName)[0]
except:
traceback.print_exc(file=f)
else:
f.write('The value was: %r\n' % value)
finally:
_winreg.CloseKey(h)
except:
traceback.print_exc(file=f)
GetRegistryValue(f, _winreg.HKEY_CLASSES_ROOT, 'HKEY_CLASSES_ROOT',
'Python.CompiledFile\\shell\\open\\command')
GetRegistryValue(f, _winreg.HKEY_CLASSES_ROOT, 'HKEY_CLASSES_ROOT',
'Python.File\\shell\\open\\command')
GetRegistryValue(f, _winreg.HKEY_LOCAL_MACHINE, 'HKEY_LOCAL_MACHINE',
'SOFTWARE\\Classes\\Python.CompiledFile\\shell\\open\\command')
GetRegistryValue(f, _winreg.HKEY_LOCAL_MACHINE, 'HKEY_LOCAL_MACHINE',
'SOFTWARE\\Classes\\Python.File\\shell\\open\\command')
f.write('\n')
GetRegistryValue(f, _winreg.HKEY_LOCAL_MACHINE, 'HKEY_LOCAL_MACHINE',
'SOFTWARE\\R-core\\R32', 'Current Version')
GetRegistryValue(f, _winreg.HKEY_LOCAL_MACHINE, 'HKEY_LOCAL_MACHINE',
'SOFTWARE\\R-core\\R32', 'InstallPath')
GetRegistryValue(f, _winreg.HKEY_LOCAL_MACHINE, 'HKEY_LOCAL_MACHINE',
'SOFTWARE\\R-core\\R', 'Current Version')
GetRegistryValue(f, _winreg.HKEY_LOCAL_MACHINE, 'HKEY_LOCAL_MACHINE',
'SOFTWARE\\R-core\\R', 'InstallPath')
f.write('\n')
f.write('Trying to import GeoEco.OceanographicAnalysis.Fronts\n')
try:
import GeoEco.OceanographicAnalysis.Fronts
except:
traceback.print_exc(file=f)
else:
f.write('Successfully imported GeoEco.OceanographicAnalysis.Fronts from
%s\n' % sys.modules['GeoEco.OceanographicAnalysis.Fronts'].__file__)
cleanFrontsFile =
os.path.join(os.path.dirname(sys.modules['GeoEco.OceanographicAnalysis.Fronts'].__file__),
'CleanFronts.py')
if os.path.exists(cleanFrontsFile):
f.write('%s exists\n' % cleanFrontsFile)
f.write('Trying to import win32api\n')
try:
import win32api
except:
traceback.print_exc(file=f)
else:
f.write('Calling win32api.FindExecutable on %s\n' %
cleanFrontsFile)
try:
executable = win32api.FindExecutable(cleanFrontsFile,
cleanFrontsFile)[1]
except:
traceback.print_exc(file=f)
else:
f.write('win32api.FindExecutable returned %s\n' % executable)
else:
f.write('%s DOES NOT EXIST' % cleanFrontsFile)
f.write('\n')
f.write('Initializing MGET logging\n')
f.close()
loggingIniContents = u"""
[handlers]
keys=LogFile
[handler_LogFile]
class=FileHandler
formatter=LogFile
args=(u'""" + outputTextFile + """',)
[formatters]
keys=LogFile
[formatter_LogFile]
format=%(asctime)s %(levelname)s %(message)s
[loggers]
keys=root,GeoEco,ArcGIS,COM,DatabaseAccess,Datasets,R
[logger_GeoEco]
level=DEBUG
handlers=LogFile
propagate=0
qualname=GeoEco
[logger_ArcGIS]
level=DEBUG
handlers=LogFile
propagate=0
qualname=GeoEco.ArcGIS
[logger_COM]
level=DEBUG
handlers=LogFile
propagate=0
qualname=GeoEco.COM
[logger_DatabaseAccess]
level=DEBUG
handlers=LogFile
propagate=0
qualname=GeoEco.DatabaseAccess
[logger_Datasets]
level=DEBUG
handlers=LogFile
propagate=0
qualname=GeoEco.Datasets
[logger_R]
level=DEBUG
handlers=LogFile
propagate=0
qualname=GeoEco.R
[logger_root]
level=DEBUG
handlers=LogFile
"""
loggingIniPath = os.path.join(os.path.dirname(__file__),
os.path.splitext(os.path.basename(__file__))[0] + '_Logging.ini')
fLoggingIni = open(loggingIniPath, 'w')
try:
fLoggingIni.write(loggingIniContents)
finally:
fLoggingIni.close()
try:
from GeoEco.Logging import Logger
Logger.Initialize(loggingConfigFile=unicode(loggingIniPath))
finally:
os.remove(loggingIniPath)
Logger.Info('Trying to access R')
try:
from GeoEco.R import R, RDependency
d = RDependency(2, 5, 0)
d.Initialize()
r = R.GetInterpreter()
Logger.Info('Trying 1+1 with R.')
r('print(1+1)')
except:
Logger.LogExceptionAsError()
f.close()
#raw_input()
Archives powered by MHonArc.