Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pycsw-admin.py -c export_records cannot deal with URL identifiers #566

Closed
2 of 8 tasks
frafra opened this issue Apr 1, 2018 · 0 comments
Closed
2 of 8 tasks

pycsw-admin.py -c export_records cannot deal with URL identifiers #566

frafra opened this issue Apr 1, 2018 · 0 comments

Comments

@frafra
Copy link
Contributor

frafra commented Apr 1, 2018

Description

identifier sanitization doesn't work with URL.

Environment

  • operating system: Fedora 26 x86_64
  • Python version: 3.6.2
  • pycsw version: 2.0.3
  • source/distribution
    • git clone
    • DebianGIS/UbuntuGIS
    • PyPI
    • zip/tar.gz
    • other (please specify):
  • web server
    • Apache/mod_wsgi
    • CGI
    • other (please specify):

Steps to Reproduce

  1. Insert record via transaction using URL as identifier (DublinCore metadata)
  2. export_records using pycsw-admin.py

Result:

[...]
Exporting records

Processing http://localhost
 Sanitizing identifier
Writing to file //localhost.xml
Traceback (most recent call last):
  File "/home/frafra/Code/psab/venv/lib64/python3.6/site-packages/pycsw/core/admin.py", line 398, in export_records
    with open(filename, 'w') as xml:
PermissionError: [Errno 13] Permission denied: '//localhost.xml'
[...]
kwilcox added a commit to kwilcox/pycsw that referenced this issue Aug 24, 2018
…ython#566

Return the loades and exported records from the admin functions

Export records in functional tests if an "export" directory exists

I spent a good amount of time trying to integrate this into the testing
suite more cleanrly (not in the _initialize_database function) but came
up with no solution that didn't require a large refator of the testing
code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant