﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking
323	pycsw - inconsistent path requirements for admin vs. front end	TC Haddad	Jeff McKenna	"This is probably not only an MS4W issue, but it is probably specific to Windows users of pycsw, so noting it here with examples from the MS4W demo:

The main admin tool for pycsw is 'pycsw-admin.py' as documented here:
https://docs.pycsw.org/en/stable/administration.html

It appears that this script is requiring a full drive path in the configuration settings, for access to the pycsw database:

{{{
database=sqlite:///C:\\ms4w\\apps\\pycsw-2.6.0\\tests\\functionaltests\\suites\\cite\\data\\cite.db
}}}

Without a full path, the script will throw an error complaining about not being able to find the database.

{{{
[...]
sqlite3.OperationalError: unable to open database file
[...]
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) unable to open database file
}}}


Meanwhile, the main pycsw application is accessed via the browser at:
http://127.0.0.1/pycsw?SERVICE=CSW&REQUEST=GetCapabilities

For this to work, the it seems the path to the database should not have the drive letter configured as in

{{{
database=sqlite:///tests\\functionaltests\\suites\\cite\\data\\cite.db
}}}

Without this version of the path, the main pycsw application will return an error of:

{{{
<!-- pycsw 2.6.0 -->
<ows20:ExceptionReport version=""3.0.0"" xml:lang=""en-US"" xsi:schemaLocation=""http://www.opengis.net/ows/2.0 http://schemas.opengis.net/ows/2.0/owsExceptionReport.xsd"">
<ows20:Exception exceptionCode=""NoApplicableCode"" locator=""service"">
<ows20:ExceptionText>Could not initialize repository. Check server logs</ows20:ExceptionText>
</ows20:Exception>
</ows20:ExceptionReport>
}}}

It would be convenient if both the pycsw admin and the pycsw front-end could operate using the same path configuration to the database, as it is inconvenient to switch between the two (although no restart is required, so it's not as bad as it could be). 

I found an old unresolved stack exchange question that seemed like it could be related, so I think this is Windows specific rather than MS4W specific:

https://gis.stackexchange.com/questions/95304/how-to-set-up-pycsw-on-xampp-win7

Not sure if you would try to handle it for MS4W, or pass to the pycsw folks?

"	defect	new	enhancement	5.2.0 release	MS4W - Packages	4.0.5		pycsw	TC Haddad		
