Skip to Content.

mget-help - RE: [mget-help] Calculate Moon Phase For Dates in Fields

Please Wait...

Subject: Marine Geospatial Ecology Tools (MGET) help

Text archives


RE: [mget-help] Calculate Moon Phase For Dates in Fields


Chronological Thread 
  • From: Jason Roberts <>
  • To: Fabio Matos <>
  • Cc: "" <>
  • Subject: RE: [mget-help] Calculate Moon Phase For Dates in Fields
  • Date: Fri, 3 Feb 2017 16:16:06 +0000
  • Accept-language: en-US
  • Authentication-results: spf=none (sender IP is ) ;
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:99

Dear Fábio,

The problem is that ArcGIS is not able to write to Excel sheets, at least
through Python-based tools like MGET that use ArcGIS's Python modules.
(ArcGIS cannot update .csv files either, for the same reason as Excel.)
Please copy your data to a .dbf table or to a geodatabase table and try
again. Sorry for this inconvenience; it is a limitation of ArcGIS.

Best regards,

Jason

-----Original Message-----
From:
[] On Behalf Of Fabio Matos
Sent: Friday, February 3, 2017 11:07 AM
To:
Subject: [mget-help] Calculate Moon Phase For Dates in Fields

Hi,

I would like to use the Calculate Moon Phase For Dates in Fields script but
I'm getting consistently the same erros, even changing the date format:

Traceback (most recent call last):
File "C:\Program Files\GeoEco\ArcGISToolbox\Scripts
\MoonCalculateMoonPhaseForArcGISTable.py", line 5, in <module>

ExecuteMethodFromCommandLineAsArcGISTool('GeoEco.SpatialAnalysis.Astronomy',
'Moon', 'CalculateMoonPhaseForArcGISTable')
File "C:\Python27\ArcGIS10.2\lib\site-packages\GeoEco\ArcGISScripts.py",
line 210, in ExecuteMethodFromCommandLineAsArcGISTool
exec sourceCode in globals(), locals()
File "<string>", line 1, in <module>
File "C:\Python27\ArcGIS10.2\lib\site-packages\GeoEco\SpatialAnalysis
\Astronomy.py", line 109, in CalculateMoonPhaseForArcGISTable
cursor = tableObj.OpenUpdateCursor(rowCount=tableObj.GetRowCount()) #
Provide a value for rowCount, so the ArcGIS progressor will be used.
File "C:\Python27\ArcGIS10.2\lib\site-packages\GeoEco\Datasets\__init__.py",
line 1660, in OpenUpdateCursor
return self._OpenUpdateCursor(fields, where, orderBy, rowCount,
reportProgress, rowDescriptionSingular, rowDescriptionPlural)
File "C:\Python27\ArcGIS10.2\lib\site-packages\GeoEco\Datasets\ArcGIS.py",
line 2061, in _OpenUpdateCursor
return ArcGISUpdateCursor(self, fields, where, orderBy, rowCount,
reportProgress, rowDescriptionSingular, rowDescriptionPlural)
File "C:\Python27\ArcGIS10.2\lib\site-packages\GeoEco\Datasets\__init__.py",
line 2432, in __init__
super(UpdateCursor, self).__init__(dataset, fields, where, orderBy,
rowCount, False, rowDescriptionSingular, rowDescriptionPlural)
File "C:\Python27\ArcGIS10.2\lib\site-packages\GeoEco\Datasets\__init__.py",
line 2195, in __init__
raise RuntimeError(_(u'Cannot retrieve %(plural)s from %(dn)s. Failed to
open a %(curtype)s cursor due to %(e)s: %(msg)s') % {u'plural':
self._RowDescriptionPlural, u'dn': dataset.DisplayName, u'curtype':
cursorType, u'e': e.__class__.__name__, u'msg': Dataset._Unicode(e)})
RuntimeError: Cannot retrieve rows from ArcGIS TableView "Sheet1$" of Table
"\ \Mac\Home\Desktop\moon_phase\moon_phase.xls\Sheet1$". Failed to open a
update cursor due to ArcGISError: The updatecursor function of the ArcGIS
Geoprocessor object failed when given the parameters (*args=('Sheet1$', '',
'', '', '')) and reported RuntimeError

Failed to execute (MoonCalculateMoonPhaseForArcGISTable).

What format the table should have?

Thank you.

Regards,
Fábio



Archive powered by MHonArc 2.6.19.

Top of Page