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 python 3 problem persists? #5

Closed
rsignell-usgs opened this issue Dec 21, 2016 · 3 comments
Closed

pycsw python 3 problem persists? #5

rsignell-usgs opened this issue Dec 21, 2016 · 3 comments

Comments

@rsignell-usgs
Copy link
Contributor

rsignell-usgs commented Dec 21, 2016

I saw the container on docker hub was updated 7 days ago, but I just tried installing the new container and I'm getting the same problems when exporting:

docker logs pycsw
...
Dec 21 11:38:20 fd343fd10718 pycsw_export: Found 12 records
Dec 21 11:38:20 fd343fd10718 pycsw_export:
Dec 21 11:38:20 fd343fd10718 pycsw_export: Exporting records
Dec 21 11:38:20 fd343fd10718 pycsw_export:
Dec 21 11:38:20 fd343fd10718 pycsw_export: Processing 5798c696e4b0589fa1c728a5
Dec 21 11:38:20 fd343fd10718 pycsw_export: Writing to file /export/5798c696e4b0589fa1c728a5.xml
Dec 21 11:38:20 fd343fd10718 pycsw_export: Traceback (most recent call last):
Dec 21 11:38:20 fd343fd10718 pycsw_export:   File "/opt/pycsw/pycsw/core/admin.py", line 396, in export_records
Dec 21 11:38:20 fd343fd10718 pycsw_export:     xml.write(record.xml)
Dec 21 11:38:20 fd343fd10718 pycsw_export: TypeError: write() argument must be str, not bytes
Dec 21 11:38:20 fd343fd10718 pycsw_export:
Dec 21 11:38:20 fd343fd10718 pycsw_export: During handling of the above exception, another exception occurred:
Dec 21 11:38:20 fd343fd10718 pycsw_export:
Dec 21 11:38:20 fd343fd10718 pycsw_export: Traceback (most recent call last):
Dec 21 11:38:20 fd343fd10718 pycsw_export:   File "bin/pycsw-admin.py", line 266, in <module>
Dec 21 11:38:20 fd343fd10718 pycsw_export:     admin.export_records(CONTEXT, DATABASE, TABLE, XML_DIRPATH)
Dec 21 11:38:20 fd343fd10718 pycsw_export:   File "/opt/pycsw/pycsw/core/admin.py", line 398, in export_records
Dec 21 11:38:20 fd343fd10718 pycsw_export:     raise RuntimeError("Error writing to %s" % filename, err)
Dec 21 11:38:20 fd343fd10718 pycsw_export: RuntimeError: ('Error writing to /export/5798c696e4b0589fa1c728a5.xml', TypeError('write() argument must be str, not bytes',))

I logged into the container and it seems that the libxml2 version is the recommended 2.9.3:

docker exec -it pycsw bash
root@fd343fd10718:/opt/pycsw# conda list libxml2
# packages in environment at /opt/conda:
#
libxml2                   2.9.3                         9    conda-forge

@kwilcox, #help?

@kwilcox
Copy link
Contributor

kwilcox commented Dec 21, 2016

The image was built before the PR was merged into pycsw. I'll kick off a build manually.

@kwilcox
Copy link
Contributor

kwilcox commented Dec 21, 2016

@rsignell-usgs give it another shot

@rsignell-usgs
Copy link
Contributor Author

Woohoo! Houston, we have EXPORT!

(ioos) rsignell@gamone:/opt/docker/pycsw/export> ls
5798c696e4b0589fa1c728a5.xml        COAWST.USEAST.Forecast.xml
57f2aa95e4b0bc0bec001f03.xml        USGS_BBLEH_SANDY_076.xml
57fe81fbe4b0824b2d148389.xml        USGS_COAWST_CHINCO_bedelevation.xml
580e7704e4b0f497e794b928.xml        USGS_COAWST_CHINCO_SANDY.xml
COAWST.Barnegat_Bay.Spring2012.xml

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

2 participants