Esri / hermes

Collection of Metadata Utilities to read/write data to different format.
Apache License 2.0
14 stars 4 forks source link

Help? #4

Open kartogishenko opened 5 years ago

kartogishenko commented 5 years ago

I get a bunch of errors trying to replicate you User Reader example saying:

File "hermtest.py", line 6, in <module>
    pw = Paperwork(dataset=fc)
  File "C:\pythonenv\pyodbc_hermes\venv\lib\site-packages\esri_hermes-1.1.2-py2.7.egg\hermes\paperwork.py", line 89, in __init__
    self.dataset = dataset
  File "C:\pythonenv\pyodbc_hermes\venv\lib\site-packages\esri_hermes-1.1.2-py2.7.egg\hermes\paperwork.py", line 128, in dataset
    self._setup()
  File "C:\pythonenv\pyodbc_hermes\venv\lib\site-packages\esri_hermes-1.1.2-py2.7.egg\hermes\paperwork.py", line 111, in _setup
    "arc" : str(arcpy.GetMessages(2))
hermes.common.HermesErrorHandler: {'function': '_setup', 'line': 'line 102', 'arc': '', 'synerror': 'RuntimeError: Object: Error in executing tool', 'filename': 'paperwork.py'}

What am I missing? I have imported arcpy, hermes and from hermes imported Paperwork

achapkowski commented 5 years ago

What version of arcpy are you using? Can you post your full code sample to reproduce along with dataset?

kartogishenko commented 5 years ago

I am on ArcMap 10.5.1 and Python 2.7 running in virtual environment with arcpy support. The script is simply

import arcpy
import hermes
from hermes import Paperwork
fc = r"c:\Temp\metatest.gdb\Test2"
pw = Paperwork(dataset=fc)
print pw.convert()

The data is generic, a sample FGDB with a Point layer created in ArcCatalog. I have allso tried a shapefile containg polylines metatest.gdb.zip

achapkowski commented 5 years ago

@kartogishenko I just tested the dataset using 10.5.1 of ArcMap as follows:

import hermes
pw = hermes.Paperwork(dataset=r"C:\test_data\metatest.gdb\Testset\Test1")
print pw.convert()

The metadata showed.

I was able to view the metdata for the Test2 dataset as well.