Coder Social home page Coder Social logo

alexarcpy / registrant Goto Github PK

View Code? Open in Web Editor NEW
69.0 9.0 17.0 343 KB

Python package used for generating HTML reports about the contents of Esri geodatabases.

License: MIT License

Python 88.48% CSS 2.15% JavaScript 2.77% HTML 6.60%
arcgis geodatabase esri arcpy reporting python arcgis-desktop arcgis-pro arcgis-python html-report

registrant's Introduction

Language grade: Python

General

This Python package is used for generating HTML reports about the contents of Esri geodatabases. It supports working with Esri personal/file geodatabases as well as RDBMS enterprise geodatabases (however, it also works with RDBMS databases that were not geodatabase enabled).

Example of report:

Sample report

Usage guidelines

In order to use this tool, you would need to have either:

  • ArcGIS Desktop, ArcGIS Server or ArcGIS Pro installed (for arcpy package). You will be able to run the tool with ArcGIS Desktop/Server Python 2.7 as well as ArcGIS Pro Python 3.5+.
  • GDAL (for ogr package). This means you will be able to run the tool without having any Esri software installed. However, only file geodatabases are supported for reporting with GDAL.

The code written is a valid Python 2 as well as Python 3 code, so using the tool in both environments is supported. You will need pandas and beatifulSoup Python packages which can be installed from pip if you are ArcGIS Desktop/Server user or using conda if you are ArcGIS Pro or Anaconda user. See Installing Packages in the Python documentation (for ArcGIS Desktop users) and Install a package in the Conda documentation (for ArcGIS Pro and Anaconda users) to get help.

If the package is able to import arcpy, then it will use arcpy because it provides a more complete view into your geodatabase. The most time is spent in arcpy describe and listing functions iterating the datasets and pulling all the relevant information.

If arcpy is not found in your system, then the package will try to import ogr. The OpenFileGDB driver is used to access the key information about the geodatabase and its items. Please keep in mind that when using ogr, no information about tables/feature classes indexes and subtypes will be reported and many of the ArcGIS specific properties won't be shown either.

Output report

After HTML file is generated, you can open it in a web browser. The HTML file uses resources in other folders located in the app folder which means you cannot move the HTML file somewhere else without copying its dependency folders. If you would like to move the report somewhere else, you need to copy the whole app folder. While having the HTML file shown in a web browser, you can use the links to navigate throughout the page. Keep in mind that since navigation is built using the headers id, you can use the web browser's tools for navigating forward and back as you navigate between different sections of the report.

Requirements

  • arcpy | GDAL 2.1.0
  • Python 2.7 | 3.5
  • pandas >= 0.20.1
  • beautifulsoup4 >= 4.6.0

Installation

python setup.py install

Please keep in mind that arcpy and GDAL won't be installed when installing the package. The arcpy package can be obtained by installing ArcGIS software and GDAL can be installed in many ways, for instance, using Anaconda Navigator or using a binary wheel.

Getting started

When creating a Reporter class, you'd need to supply path to your geodatabase and output folder for report data files. Then, calling Reporter.gdb2html() would let you optionally specify what information you would like to include into your output HTML report. Depending on the geodatabase size, number of chosen items to include in the report as well as the available system resources, it might take some minutes to run.

The package has convenience functions which can be used to specify what exactly do you want to generate report for. The gdb2html function will create a complete report. This function provides you with fine-grained control over what information will be included in the report, so you can use it providing booleans arguments (for instance, you may want to get only list of tables and feature classes without reporting their fields, subtypes, and indexes). However, you can specify if you want to report only domains, only tables, or only feature classes using the domains2html, tables2html, and fcs2html functions respectively.

To generate full geodatabase report:

import registrant
reporter = registrant.Reporter(
    r"C:\GIS\Production.gdb", r"C:\GIS\ReportFolder"
)
reporter.gdb2html()
print(reporter.report_file_path)

To generate report listing only tables and feature classes (with no information on fields, subtypes, and indexes):

import registrant
reporter = registrant.Reporter(
    r"C:\GIS\Production.gdb", r"C:\GIS\ReportFolder"
)
reporter.gdb2html(
    do_report_versions=False,
    do_report_replicas=False,
    do_report_domains=False,
    do_report_domains_coded_values=False,
    do_report_relclasses=False,
    do_report_tables=True,
    do_report_tables_fields=False,
    do_report_tables_subtypes=False,
    do_report_tables_indexes=False,
    do_report_fcs=True,
    do_report_fcs_fields=False,
    do_report_fcs_subtypes=False,
    do_report_fcs_indexes=False,
)
print(reporter.report_file_path)

To generate report listing only domains and coded values for domains:

import registrant
reporter = registrant.Reporter(
    r"C:\GIS\Production.gdb", r"C:\GIS\ReportFolder"
)
registrant.domains2html()

Architecture

This tool uses arcpy package (and if you don't have any ArcGIS software installed - ogr package) to read properties of geodatabase into Python dictionaries which are used then to construct pandas data frames. The data frames are exported into HTML tables (as large strings) using built-in pandas.DataFrame.to_html method. To merge all the HTML tables into a single page, beatifulSoup package is used. The HTML report page is built using the Bootstrap 3 Dashboard sample. Some extra functionality is added with the help of Bootstrap 3 DataTables extension. Additional navigation items in the table of contents are added to the HTML page on-the-fly while reading geodatabase tables and feature classes.

FAQ

  • Why not just use ArcGIS Diagrammer to generate HTML reports?

    ArcGIS Diagrammer was deprecated at ArcGIS 10.3 which means only users of ArcGIS 10.0-10.2 can use it. If you have ArcGIS 10.3 or above, you can still install it on your machine, but you would need to have the .dll files of ArcObjects SDK for .NET of version 10.2 available.

    The registrant package tool is not a replacement of ArcGIS Diagrammer as it can only report the information about the geodatabase contents (you cannot design a new geodatabase). However, this tool reports a lot of useful information about the contents of geodatabase as ArcGIS Diagrammer does. This means that you might not need to install ArcGIS Diagrammer if you are only interested in getting the HTML reports about the geodatabase contents.

  • I would like to see the information about X being reported, but the HTML report doesn't provide any information about it. Can you please add it?

    Feel free to post an issue in this repository and I will see what's possible.

  • Why does it take less time for ArcGIS Diagrammer to generate HTML report about my geodatabase?

    ArcGIS Diagrammer was built using fine-grained ArcObjects libraries which provides low-level access to the underlying geodatabase datasets and their properties. With this Python package, reading the geodatabase is done using arcpy Python package which makes it really easy to write and maintain this package, however there is a price to pay for that; it takes extra time to convert ArcObjects COM objects to Python objects and vice versa which results in longer processing time. Reading properties of geodatabase datasets with ogr happens much faster than when using arcpy, but you don't get all the properties exposed via this interface.

    If you need to produce HTML reports fairly often and performance does matter to you, try to leave out some of the report options to save time. You could, for instance, skip reporting indexes and subtypes for every table and feature class if you have a large number of datasets in your geodatabase.

  • I have no Esri software and no GDAL/OGR installed. Can I generate the report of my SQL Server/Oracle/MySQL/PostgreSQL/etc database anyway?

    No, you cannot because the package expects to be able to pull all the information about the tables and columns using either arcpy which comes with ArcGIS software or OGR which comes together with GDAL Python bindings. However, there are many other programs that will be able to generate the schema report among many other things. Take a look at SchemaSpy, for instance.

Report contents

  • General geodatabase overview
  • Enterprise geodatabase versions
  • Enterprise and local geodatabase replicas
  • Domains & coded values
  • Tables & Feature classes
  • Table & Feature class fields
  • Table & Feature class subtypes (arcpy only)
  • Table & Feature class indexes (arcpy only)

Added in v0.2:

  • Replicas and replicas' datasets (arcpy only)

Added in v0.3:

  • Versions in SDE geodatabases (arcpy only)

Added in v0.4:

  • Properties Attachments enabled and Attachments count for tables and feature classes (arcpy only)

Added in v0.5:

  • Relationship classes in geodatabases (arcpy only)

Added in v0.6:

  • Reporting more information for GDAL users using geodatabase XML metadata

Added in v0.7:

  • Redesigned architecture with the new public interface

All fields in tables and feature classes have a property showing the order of the field (UI order) within the dataset as shown in the dataset properties window in ArcGIS Desktop or Pro that is the order in which the fields were added. This is the order in which fields appear when you open the Feature Class Properties or Table Properties window in ArcGIS Desktop or when you access the Fields window in ArcGIS Pro.

As a note, Unicode characters are supported in geodatabase table names, field aliases and so forth. The web page should be drawn using the utf-8 encoding. Should any characters appear strange, make sure you are viewing the report page in the proper encoding:

  • Firefox: View > Text Encoding > Unicode
  • IE: View > Encoding > Unicode (UTF-8)
  • Chrome: auto-detect should do the magic

Report functionality

  • Navigation panel to the left lets you quickly jump between different report sections.

  • All columns are sortable (ASC | DESC) with the option to choose a number of entries to show for every data table and use paging. Every section also has the Search panel for text search within the section (e.g., search for the field name in a particular feature class) that will filter out table rows with no matches.

  • It is possible to select rows in the data tables (with highlight). Operating system keys such as Ctrl/Shift can be used for selecting multiple rows. More about selecting rows in data tables.

  • It is possible to re-order columns in the data tables by dragging them and dropping in the needed place. More about re-ordering columns in data tables.

  • It is possible to enable toggle word break in the data tables cells which can be handy for cells with long words (the checkbox is found in the upper-left corner of the left panel).

  • All feature classes have a single default subtype defined for them, so to save the space the information about subtypes will be reported only when there are at least two subtypes (which means at least one subtype has been added by the user).

  • By using the Print link one can create a printable representation of the report; opening printable report can take some time depending on the number of items in your geodatabase. The report page will be visible in the new browser tab about:blank. The generation of printable report works best in Firefox. Please mind that Chrome and IE can choke when the report content is very large.

New functionality under consideration

Take each domain > list all tables/fcs that use this domain > list all fields that have this domain assigned > count rows using domain value group by code

Report design and contents

  • Pick what columns to show in each data table using Buttons extension.

  • Add mapping for arcpy.Field data types and ArcGIS Desktop (String - Text etc)

Running tests locally

  1. Cd to the tests folder and run coverage run -m unittest discover. This will create a .coverage file which contains the metadata about code coverage.

  2. Cd to the tests folder and run coverage html -d coverage_html. This will generate a nice .html report highlighting the covered code. Calls to arcpy are excluded in the report thanks to the .coveragerc file.

Keep in mind that you need to make sure that arcpy is not found when you run tests for OGR as this will make the tests fail. In Wing IDE, right-click OGR test files > File Properties menu > Testing tab > choose empty Custom for Python path for the Python environments used to run the OGR tests (Anaconda env). This will make sure ArcGIS paths won't be added to the sys.path.

You also need to make sure that the right initial diretory used when starting the tests. In Wing IDE, go to the launch configuration properties and under the Environment tab, choose Use default for the Initial Directory property. This is required to be able to find the sample geodatabase files.

Issues

Did you find a bug? Do you need report to include some other information? Please let me know by submitting an issue.

Licensing

MIT

registrant's People

Contributors

alexarcpy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

registrant's Issues

Problem importing after install

Hi Alex, I am using python 2.7.8 and ArcGIS 10.3.1

  • Downloaded zip and unpacked into desktop folder.
  • Installed in powershell using the method in your Installation guide:
  • Tried reinstall after first try to no avail. used pip uninstall registrant

python setup.py install

powershell output:

PS C:\users\user\desktop\registrant-master> python setup.py install
running install
running bdist_egg
running egg_info
writing requirements to registrant.egg-info\requires.txt
writing registrant.egg-info\PKG-INFO
writing top-level names to registrant.egg-info\top_level.txt
writing dependency_links to registrant.egg-info\dependency_links.txt
reading manifest file 'registrant.egg-info\SOURCES.txt'
writing manifest file 'registrant.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_py
creating build\bdist.win32\egg
creating build\bdist.win32\egg\registrant
creating build\bdist.win32\egg\registrant\app
creating build\bdist.win32\egg\registrant\app\css
copying build\lib\registrant\app\css\bootstrap.min.css -> build\bdist.win32\egg\registrant\app\css
copying build\lib\registrant\app\css\buttons.dataTables.min.css -> build\bdist.win32\egg\registrant\app\css
copying build\lib\registrant\app\css\dashboard.css -> build\bdist.win32\egg\registrant\app\css
copying build\lib\registrant\app\css\dataTables.bootstrap.min.css -> build\bdist.win32\egg\registrant\app\css
copying build\lib\registrant\app\css\ie10-viewport-bug-workaround.css -> build\bdist.win32\egg\registrant\app\css
creating build\bdist.win32\egg\registrant\app\fonts
copying build\lib\registrant\app\fonts\glyphicons-halflings-regular.eot -> build\bdist.win32\egg\registrant\app\fonts
copying build\lib\registrant\app\fonts\glyphicons-halflings-regular.svg -> build\bdist.win32\egg\registrant\app\fonts
copying build\lib\registrant\app\fonts\glyphicons-halflings-regular.ttf -> build\bdist.win32\egg\registrant\app\fonts
copying build\lib\registrant\app\fonts\glyphicons-halflings-regular.woff -> build\bdist.win32\egg\registrant\app\fonts
copying build\lib\registrant\app\fonts\glyphicons-halflings-regular.woff2 -> build\bdist.win32\egg\registrant\app\fonts
creating build\bdist.win32\egg\registrant\app\js
copying build\lib\registrant\app\js\bootstrap.min.js -> build\bdist.win32\egg\registrant\app\js
copying build\lib\registrant\app\js\buttons.print.min.js -> build\bdist.win32\egg\registrant\app\js
copying build\lib\registrant\app\js\dataTables.bootstrap.min.js -> build\bdist.win32\egg\registrant\app\js
copying build\lib\registrant\app\js\dataTables.buttons.min.js -> build\bdist.win32\egg\registrant\app\js
copying build\lib\registrant\app\js\holder.min.js -> build\bdist.win32\egg\registrant\app\js
copying build\lib\registrant\app\js\ie-emulation-modes-warning.js -> build\bdist.win32\egg\registrant\app\js
copying build\lib\registrant\app\js\ie10-viewport-bug-workaround.js -> build\bdist.win32\egg\registrant\app\js
copying build\lib\registrant\app\js\jquery.dataTables.min.js -> build\bdist.win32\egg\registrant\app\js
copying build\lib\registrant\app\js\jquery.min.js -> build\bdist.win32\egg\registrant\app\js
copying build\lib\registrant\app_init_.py -> build\bdist.win32\egg\registrant\app
creating build\bdist.win32\egg\registrant\html-template
copying build\lib\registrant\html-template\template.html -> build\bdist.win32\egg\registrant\html-template
copying build\lib\registrant\html-template_init_.py -> build\bdist.win32\egg\registrant\html-template
copying build\lib\registrant_build_html.py -> build\bdist.win32\egg\registrant
copying build\lib\registrant_config.py -> build\bdist.win32\egg\registrant
copying build\lib\registrant_data_objects.py -> build\bdist.win32\egg\registrant
copying build\lib\registrant_geodatabase.py -> build\bdist.win32\egg\registrant
copying build\lib\registrant_reporter.py -> build\bdist.win32\egg\registrant
copying build\lib\registrant_util_mappings.py -> build\bdist.win32\egg\registrant
copying build\lib\registrant_init_.py -> build\bdist.win32\egg\registrant
byte-compiling build\bdist.win32\egg\registrant\app_init_.py to init.pyc
byte-compiling build\bdist.win32\egg\registrant\html-template_init_.py to init.pyc
byte-compiling build\bdist.win32\egg\registrant_build_html.py to _build_html.pyc
byte-compiling build\bdist.win32\egg\registrant_config.py to _config.pyc
byte-compiling build\bdist.win32\egg\registrant_data_objects.py to _data_objects.pyc
byte-compiling build\bdist.win32\egg\registrant_geodatabase.py to _geodatabase.pyc
byte-compiling build\bdist.win32\egg\registrant_reporter.py to _reporter.pyc
byte-compiling build\bdist.win32\egg\registrant_util_mappings.py to util_mappings.pyc
byte-compiling build\bdist.win32\egg\registrant_init
.py to init.pyc
creating build\bdist.win32\egg\EGG-INFO
copying registrant.egg-info\PKG-INFO -> build\bdist.win32\egg\EGG-INFO
copying registrant.egg-info\SOURCES.txt -> build\bdist.win32\egg\EGG-INFO
copying registrant.egg-info\dependency_links.txt -> build\bdist.win32\egg\EGG-INFO
copying registrant.egg-info\requires.txt -> build\bdist.win32\egg\EGG-INFO
copying registrant.egg-info\top_level.txt -> build\bdist.win32\egg\EGG-INFO
zip_safe flag not set; analyzing archive contents...
registrant._config: module references file
creating 'dist\registrant-0.1-py2.7.egg' and adding 'build\bdist.win32\egg' to it
removing 'build\bdist.win32\egg' (and everything under it)
Processing registrant-0.1-py2.7.egg
creating c:\python27\arcgis10.3\lib\site-packages\registrant-0.1-py2.7.egg
Extracting registrant-0.1-py2.7.egg to c:\python27\arcgis10.3\lib\site-packages
Adding registrant 0.1 to easy-install.pth file

Installed c:\python27\arcgis10.3\lib\site-packages\registrant-0.1-py2.7.egg
Processing dependencies for registrant==0.1
Searching for beautifulsoup4==4.6.0
Best match: beautifulsoup4 4.6.0
Adding beautifulsoup4 4.6.0 to easy-install.pth file

Using c:\python27\arcgis10.3\lib\site-packages
Searching for pandas==0.20.3
Best match: pandas 0.20.3
Processing pandas-0.20.3-py2.7-win32.egg
pandas 0.20.3 is already the active version in easy-install.pth

Using c:\python27\arcgis10.3\lib\site-packages\pandas-0.20.3-py2.7-win32.egg
Searching for numpy==1.7.1
Best match: numpy 1.7.1
Adding numpy 1.7.1 to easy-install.pth file

Using c:\python27\arcgis10.3\lib\site-packages
Searching for pytz==2016.10
Best match: pytz 2016.10
Adding pytz 2016.10 to easy-install.pth file

Using c:\python27\arcgis10.3\lib\site-packages
Searching for python-dateutil==2.6.0
Best match: python-dateutil 2.6.0
Adding python-dateutil 2.6.0 to easy-install.pth file

Using c:\python27\arcgis10.3\lib\site-packages
Searching for six==1.10.0
Best match: six 1.10.0
Adding six 1.10.0 to easy-install.pth file

Using c:\python27\arcgis10.3\lib\site-packages
Finished processing dependencies for registrant==0.1
PS C:\users\user\desktop\registrant-master>

and my results when attempting to import in python 2.7.8 shell:

  import registrant
 
 Traceback (most recent call last):
   File "<pyshell#0>", line 1, in <module>
     import registrant
   File "C:\Python27\ArcGIS10.3\lib\site-packages\registrant-0.1-py2.7.egg\registrant\__init__.py", line 2, in <module>
    from ._reporter import domains2html, fcs2html, tables2html, gdb2html, report_gdb_as_html
   File "C:\Python27\ArcGIS10.3\lib\site-packages\registrant-0.1-py2.7.egg\registrant\_reporter.py", line 19, in <module>
     pd.set_option('display.width', 250)
   File "C:\Python27\ArcGIS10.3\lib\site-packages\pandas\core\config.py", line 193, in __call__
     return self.__func__(*args, **kwds)
   File "C:\Python27\ArcGIS10.3\lib\site-packages\pandas\core\config.py", line 98, in _set_option
     key = _get_single_key(pat, silent)
   File "C:\Python27\ArcGIS10.3\lib\site-packages\pandas\core\config.py", line 76, in _get_single_key
     raise KeyError('No such keys(s)')
 KeyError: 'No such keys(s)'
  from registrant import *
 
 Traceback (most recent call last):
   File "<pyshell#1>", line 1, in <module>
     from registrant import *
   File "C:\Python27\ArcGIS10.3\lib\site-packages\registrant-0.1-py2.7.egg\registrant\__init__.py", line 2, in <module>
     from ._reporter import domains2html, fcs2html, tables2html, gdb2html, report_gdb_as_html
   File "C:\Python27\ArcGIS10.3\lib\site-packages\registrant-0.1-py2.7.egg\registrant\_reporter.py", line 11, in <module>
     from . import _geodatabase as GDB
 ImportError: cannot import name _geodatabase

Create replica tab for enterprise geodatabases

Managing replicas is not very easy with the ArcGIS GUI As you cannot copy the replica data list (which tables/feature classes are included in replica) easily to manage the replica data.
It is possible with SQL Server Management Studio, but it would be nice if it were included in the registrant HTML output.
Replica tab could include:
replica names
replica data
replica history

AttributeError: 'NoneType' object has no attribute 'to_html'

Just wanted to say how great this tool is. I'm getting great results with it for the most part, but have two SDE connections where I get the following error and was wondering if anyone had something similar occur and what their fix was? Thanks!

AttributeError                            Traceback (most recent call last)
In  [3]:
Line 5:     reporter.gdb2html()

File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\registrant-0.7-py3.7.egg\registrant\_reporter.py, in gdb2html:
Line 132:   do_report_tables_indexes,

File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\registrant-0.7-py3.7.egg\registrant\_reporter.py, in _report_tables:
Line 445:   report_path=self.report_file_path)

File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\registrant-0.7-py3.7.egg\registrant\_build_html.py, in add_div_to_html_page:
Line 86:    html_table = df.to_html(

AttributeError: 'NoneType' object has no attribute 'to_html'

How to use with server hosted Database

I see that this hasn't been updated in a few years and no new issues have been opened in a while so I assume it's dead. But on the off chance it's not I thought I'd ask for an improvement to the documentation.
The documentation indicates that the reporter can be used with a RDBMS enterprise geodatabases but does not provide any example of how to go about doing this.
I tried to figure it out by looking at the documentation for arcpy and then looking in the code for when that was used but I couldn't find it.
Thanks

Error during install and Reporter unexpected keyword argument 'border'

ArcGIS 10.6.1 Py 2.7.14 install issues and reporter error. Setup.py installs completely until numpy-1.16.2\numpy\core\setup.py. Presents Error 32. The process cannot access the file because it is being used by another process. Attempted several times and after reboot.

Upon run attempt receive 4 traceback errors shown in attached screencap.

registrant reporter error

Parsing XML for replica data fails on certain GDBs

On a certain enterprise geodatabase registrant report_gdb_as_html fails with the following message:

Traceback (most recent call last):
File "C:/Users/140318/Desktop/Python/Scripts/GDB Summary/SummarizeGDB.py", line 23, in
registrant.report_gdb_as_html(gdb_origin, summary)
File "C:\Python27\ArcGISx6410.3\lib\site-packages\registrant-0.3-py2.7.egg\registrant_reporter.py", line 105, in report_gdb_as_html
replicas = gdb.get_replicas()
File "C:\Python27\ArcGISx6410.3\lib\site-packages\registrant-0.3-py2.7.egg\registrant_geodatabase.py", line 83, in get_replicas
xml = ET.fromstring(data)
File "C:\Python27\ArcGISx6410.3\lib\xml\etree\ElementTree.py", line 1301, in XML
return parser.close()
File "C:\Python27\ArcGISx6410.3\lib\xml\etree\ElementTree.py", line 1654, in close
self._raiseerror(v)
File "C:\Python27\ArcGISx6410.3\lib\xml\etree\ElementTree.py", line 1506, in _raiseerror
raise err
xml.etree.ElementTree.ParseError: no element found: line 2, column 0

This only occurs on one geodatabase, the others work as expected. Attached is the xml replica summary with connection data removed.
replicaxml.zip

relationship class location causes reporter error

There is a dataset with a feature class. A table is outside the dataset. If a relationship class is created between the feature class and the table, and the relationship class is placed outside the dataset the reporter.gdb2html function gives an error.

image

The workaround is to move such relationship classes to the dataset.
The code must work irrespective of the location of the relationship class as ArcGIS does not enforce any such rule. Attached FGDB for recreating the issue
Issue_gdb1.gdb.zip

AttributeError: 'module' object has no attribute 'Reporter'

New installation here that ran into some issues. Took a look at past issues and couldn't find any point of commonality. Setup is as follows: ArcGIS 10.5.1, Enterprise GDB (MS-SQL), and running Python 2.7.13.

Error being reported is as follows:
Traceback (most recent call last):
File "C:\Python27\registrant-master\run.py", line 2, in
reporter = registrant.Reporter(r"Database Connections\Connection to Carta on SQL2016GTS.sde", r"C:\GIS\Carta-GTS")
AttributeError: 'module' object has no attribute 'Reporter'

Call is coming from python script with contents:
import registrant
reporter = registrant.Reporter(r"Database Connections\Connection to Carta on SQL2016GTS.sde", r"C:\GIS\Carta-GTS")
reporter.gdb2html()
print(reporter.report_file_path)

Any thoughts?

File not found while installing

High Level: When running python setup.py install, an error occurs indicating that the temp folder does not have the file easy_install-ioklqh\pandas-1.2.4\setup.py
STR
1)Install a fresh copy of ArcGIS 10.7 Desktop.
2)Verify that c:\Python\ArcGIS10.7 is in your path
3)Verify that Pandas and beautifulsoup4 are installed using the windows command
python -m pip install pandas
python -m pip install beautifulsoup4
4)Extract Registrant into the python27 folder
5)change directory to c:\python27\registrant-master
6) Execute python setup.py install
Expected: Registrant Installs successfully
Actual: Registrant fails to install indicating that a file was not found in the user temp folder
ConsoleLog.txt

Additional notes:
The last error says that it can't find easy_install-ioklqh\pandas-1.2.4\setup.py
I manually looked at the temp folder and there is no easy_install in that folder. I'm guessing that the install is expecting some temp files to be there as a result of what it does earlier in the install. But for some reason they aren't there. Earlier on it says it is downloading pandas 1.2.4 and writing it to that same temp file before trying to run it. When I watch the temp folder while running the install they are being written, and then immediately cleaned up.
Attempting to update the pandas install manually generates the following error:
C:\Python27\registrant-master>python -m pip install pandas --upgrade
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Collecting pandas
Using cached pandas-0.24.2-cp27-cp27m-win32.whl (7.2 MB)
Collecting numpy>=1.12.0
Using cached numpy-1.16.6-cp27-cp27m-win32.whl (10.0 MB)
Requirement already satisfied, skipping upgrade: pytz>=2011k in c:\python27\arcgis10.7\lib\site-packages (from pandas) (2016.6.1)
Requirement already satisfied, skipping upgrade: python-dateutil>=2.5.0 in c:\python27\arcgis10.7\lib\site-packages (from pandas) (2.5.3)
Requirement already satisfied, skipping upgrade: six>=1.5 in c:\python27\arcgis10.7\lib\site-packages (from python-dateutil>=2.5.0->pandas) (1.10.0)
Installing collected packages: numpy, pandas
Attempting uninstall: numpy
Found existing installation: numpy 1.9.3
ERROR: Cannot uninstall 'numpy'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.